Floating point comparisons with NaN values produce wrong results

Stephen L Moshier moshier@mediaone.net
Sun Sep 5 06:56:00 GMT 1999


> static const char double_q_nan_bytes_be[8] = {0x7f, 0xf8, 0, 0, 0, 0,
0, 0};

> #define double_q_nan  (*(const double *)double_q_nan_bytes_be)


This is not valid C language.  You need to fix your test case.





More information about the Gcc-bugs mailing list