Opened 6 years ago

Closed 18 months 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:


According to, 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)?

Attachments (0)

Change History (6)

comment:1 Changed 5 years ago by Gennadiy Rozental

Resolution: wontfix
Status: newclosed

I prefer to keep :: in front of global functions. I am not aware about other workarounds. What is wrong with NO_MATH_INLINES?

comment:2 Changed 2 years ago by Jonathan Wakely <jwakely.boost@…>

This breaks building Boost on ppc64, where feclearexcept is defined as a macro:

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 Changed 2 years ago by Gennadiy Rozental

Resolution: wontfix
Status: closedreopened

comment:4 Changed 23 months ago by Raffi Enficiaud

Milestone: To Be DeterminedBoost 1.61.0

comment:5 Changed 20 months ago by Akira Takahashi <faithandbrave@…>

comment:6 Changed 18 months ago by Raffi Enficiaud

Resolution: fixed
Status: reopenedclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Gennadiy Rozental.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.