[Bug c++/88173] `std::numeric_limits<double>::quiet_NaN()` is not constexpr

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 23 18:26:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88173

--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
-fno-trapping-math is relevant. Gcc believes that comparing QNaN to something
requires setting a flag in fenv, which can only be done at runtime. I expect
that's wrong, or almost any operation on double would not be constexpr because
of the inexact flag (that would have been a consistent choice, but most people
don't care about fenv...).


More information about the Gcc-bugs mailing list