[Bug c++/60237] isnan fails with -ffast-math
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 17 17:28:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60237
--- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to N Schaeffer from comment #6)
> Is there somewhere a rationale for not making isnan() find NaN's with
> -ffinite-math-only ?
finite-math-only is basically a promise that isinf and isnan always return
false...
I have inline library functions that do: if (isnan(x)) ...
When compiled with -ffinite-math-only, I want this eliminated as dead code,
that's the reason I made the function inline in the first place.
Another way to cheat:
int myisnan(double)__asm__("isnan");
More information about the Gcc-bugs
mailing list