Re: [Boost-bugs] [Boost C++ Libraries] #11756: boost.Test: non standards compliant use of FE_* macros (unable to compile boost test library on FPU-less arches)

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11756: boost.Test: non standards compliant use of FE_* macros (unable to compile boost test library on FPU-less arches)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-03-12 08:03:52


#11756: boost.Test: non standards compliant use of FE_* macros (unable to compile
boost test library on FPU-less arches)
----------------------------------+------------------------
  Reporter: bartosz.krasinski@… | Owner: renficiaud
      Type: Patches | Status: reopened
 Milestone: Boost 1.64.0 | Component: test
   Version: Boost 1.59.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------+------------------------

Comment (by André Draszik <git@…>):

 I think it all makes sense, just re-iterating [comment:12 comment 12]:
> ''A fully standards conforming fenv.h does not have to define any FE_*
 macros, and if it does define them, then it defines macros only for the FP
 exceptions it actually supports.''
>
> So correct usage requires a triple check:
>
> 1) Check BOOST_NO_FENV_H to see if the header is supported.
> 2) Include the header and then check FE_ALL_EXCEPT to see if ''any'' FP
 exceptions are supported.
> 3) Before using the individual FE_* macros, you need to check for their
 existence too as not all may be supported.
> [...]

 [comment:56 comment 56]:
> From my point of view, it should be checked if fenv.h is available, and
 then check for the GLIBC extensions.

 So this is what is being done now. The fact that uclibc defines
 `__GLIBC__` and `__USE_GNU` without implementing the glibc extensions (on
 all arches it supports?) is the problem here.

 Just adding a check for `__UCLIBC__` into boost.test to guard usage of
 feenableexcept() etc. would be right '''if''' uclibc didn't implement them
 at all. I don't know if it does or not. I think it might for some arches?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11756#comment:57>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-03-12 08:07:19 UTC