Opened 11 years ago
Closed 11 years ago
#6156 closed Bugs (fixed)
fenv.hpp broken on clang+glibc
| Reported by: | Owned by: | John Maddock | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | math |
| Version: | Boost 1.48.0 | Severity: | Problem |
| Keywords: | Cc: | antoshkka@… |
Description
Hello,
with clang and glibc, boost doesn't protect against multiple inclusion of bits/fenv.h:
#include <fenv.h> #include <boost/lexical_cast.hpp>
/localhome/glisse2/include/boost/detail/fenv.hpp:22:11: warning: '_FENV_H' macro redefined /usr/include/fenv.h:24:9: note: previous definition is here /usr/include/x86_64-linux-gnu/bits/fenv.h:30:5: error: redefinition of enumerator 'FE_INVALID' ...
Someone apparently thought it was a good idea to add some subtleties to fenv.hpp to help people who misconfigured clang, but that is imho a bad idea and the special case should be removed (note that clang-3.0 has a good default configuration). If you insist on keeping it, please ensure that _FENV_H is not defined.
Change History (3)
comment:1 by , 11 years ago
| Component: | None → lexical_cast |
|---|---|
| Owner: | set to |
comment:2 by , 11 years ago
| Cc: | added |
|---|---|
| Component: | lexical_cast → math |
| Owner: | changed from to |
comment:3 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |

boost/detail/fenv.hpp is not directly included from lexical_cast.hpp Looks like it is a Boost.Math library error: