http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50724
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-14 09:15:35 UTC --- With -ffinite-math-only you are telling that there are no NaNs and thus GCC optimizes isnan (x) to 0. That math.h "works" probably means it has isnan implemented as macro expanding to inline assmbler.