Modify

Ticket #6767 (closed Bugs: fixed)

Opened 5 years ago

Last modified 10 months ago

Use of namespace qualifier with floating point exception functions breaks if they are macros

Reported by: jewillco Owned by: rogeeff
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)?

Attachments

Change History

comment:1 Changed 4 years ago by rogeeff

  • Status changed from new to closed
  • Resolution set to wontfix

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 19 months ago by Jonathan Wakely <jwakely.boost@…>

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 Changed 17 months ago by rogeeff

  • Status changed from closed to reopened
  • Resolution wontfix deleted

comment:4 Changed 15 months ago by renficiaud

  • Milestone changed from To Be Determined to Boost 1.61.0

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

comment:6 Changed 10 months ago by renficiaud

  • Status changed from reopened to closed
  • Resolution set to fixed
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.