This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/60237] New: isnan fails with -ffast-math
- From: "nathanael.schaeffer at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Feb 2014 10:41:48 +0000
- Subject: [Bug c++/60237] New: isnan fails with -ffast-math
- Auto-submitted: auto-generated
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) ?