[Bug c++/60237] New: isnan fails with -ffast-math
nathanael.schaeffer at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Feb 17 10:41:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60237
Bug ID: 60237
Summary: isnan fails with -ffast-math
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: nathanael.schaeffer at gmail dot com
With -ffast-math, isnan should return true if passed a NaN value.
Otherwise, how is isnan different than (x!=x) ?
isnan worked as expected with gcc 4.7, but does not with 4.8.1 and 4.8.2
How can I check if x is a NaN in a portable way (not presuming any compilation
option) ?
More information about the Gcc-bugs
mailing list