2
0
mirror of https://github.com/boostorg/test.git synced 2026-01-27 19:32:11 +00:00
André Draszik eec86d1fbe trac 11756: fix usage of floating point exception macros
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.

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.

The reason is that some (notably FPU-less) architectures,
including mips*-nf, don't define/implement some of the
floating point constants, even though fenv.h is
available.

Other projects have similar issues, e.g. pixman, and apply similar work-arounds:
https://lists.freedesktop.org/archives/pixman/2014-February/003172.html

Architectures are notably also allowed to define FE_ALL_EXCEPT to 0!
Keeping this in mind, and knowing that the compiler will eliminate
code that can't be executed, we can change BOOST_FPE_ALL to be 0 for
the case of compiling using Clang and/or fenv.h being unavailable
as well, which allows simplification of the #ifdef's in
execution_monitor.ipp a bit.
2016-10-18 23:35:15 +02:00
2016-08-18 00:17:31 +02:00
2016-10-18 23:11:52 +02:00
2015-10-20 15:00:23 +02:00
2015-08-12 23:09:32 +01:00
2016-08-18 00:17:31 +02:00
2014-03-03 01:16:29 -05:00
2010-05-16 04:00:37 +00:00
2015-10-19 14:08:16 +02:00

boosttest logo

This is the main directory for the Boost Test Library.

(Not to be confused with a directory containing test programs for the parent directory.)

Full instructions for use of this library can be accessed from http://www.boost.org/doc/libs/release/libs/test/

This library is part of boost (see www.boost.org), the latest version of the library is available from the boost web site, or development snapshots from the boost git repository at https://github.com/boostorg/test


Copyright 2001-2014, Gennadiy Rozental.
Copyright 2013-2015, Boost.Test team.

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)

Description
Mirrored via gitea-mirror
Readme BSL-1.0 13 MiB
Languages
C++ 99%
CMake 0.9%