Opened 11 years ago
Closed 6 years ago
#6767 closed Bugs (fixed)
Use of namespace qualifier with floating point exception functions breaks if they are macros
Reported by: | Jeremiah Willcock | Owned by: | Gennadiy Rozental |
---|---|---|---|
Milestone: | Boost 1.61.0 | Component: | test |
Version: | Boost 1.48.0 | Severity: | Problem |
Keywords: | Cc: |
Description
According to http://pubs.opengroup.org/onlinepubs/009604599/basedefs/fenv.h.html, operations such as feclearexcept
can be defined as macros, and at least some versions of Glibc do that by default. The use of explicit ::
qualifiers before calls to those in Boost.Test fails to compile. Is there a workaround for that (other than __NO_MATH_INLINES
)?
Change History (6)
comment:1 by , 10 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 7 years ago
This breaks building Boost on ppc64, where feclearexcept is defined as a macro:
https://bugzilla.redhat.com/show_bug.cgi?id=1262444
The problem is that libs/test/src/execution_monitor.cpp is compiled by Boost.Build (so setting __NO_MATH_INLINES
should not be necessary, it should just build) and is compiled as C++03, so GCC's <fenv.h> does not #undef the macros because <fenv.h> is not defined by the C++03 standard library so its effects are an implementation-defined extension to the standard.
Please reconsider the wontfix resolution.
comment:3 by , 7 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
comment:4 by , 7 years ago
Milestone: | To Be Determined → Boost 1.61.0 |
---|
comment:5 by , 7 years ago
FYI, fix commit is this : https://github.com/boostorg/test/commit/f50e7bc9fed323c5705c0ed992c03e80eeec1dd6
comment:6 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I prefer to keep :: in front of global functions. I am not aware about other workarounds. What is wrong with NO_MATH_INLINES?