#1040482 manpages-dev: fenv(3) should document #pragma STDC FENV_ACCESS

Package:
manpages-dev
Source:
manpages-dev
Submitter:
Andreas Beckmann
Date:
2023-07-06 12:45:04 UTC
Severity:
normal
Tags:
#1040482#5
Date:
2023-07-06 12:40:05 UTC
From:
To:
Quoting from https://en.cppreference.com/w/cpp/numeric/fenv:

    [...] The floating-point environment access and modification is only
    meaningful when #pragma STDC FENV_ACCESS is supported and is set to
    ON. Otherwise the implementation is free to assume that
    floating-point control modes are always the default ones and that
    floating-point status flags are never tested or modified. [...]

The FENV_ACCESS pragma was introduced in C99 (Chapter 7.6.1).

This should be documented in fenv.h and fenv(3).


Andreas

PS: I had to learn that the hard way with clang-16 ... where it makes a
difference ...