------- Comment #3 from rob1weld at aol dot com 2007-06-03 15:15 ------- Here is simple test for the "float-store" issue:
main() { double v = 1E308; double x = (v * v) / v; printf("Try compiling with and without -ffloat-store\n"); printf("(1E308 * 1E308) / 1E308\n"); printf("Correct output is 'inf 0' - Incorrect output is '1e+308 1'.\n"); printf("%g %d\n", x, x==v); } Reading the info file for cpp I notice in the node "Common Predefined Macros" that we define various macros for many things but nothing for "-ffloat-store". We have __NO_INLINE__ for -fno-inline We have __USER_LABEL_PREFIX__ for -f(no-)underscores We have __EXCEPTIONS for -fno-exceptions We have __NEXT_RUNTIME__ for -fnext-runtime We have __SSP__ for -fstack-protector We have __SSP_ALL__ for -fstack-protector-all On the basis that using "-ffloat-store" alters the resulting output of gcc I propose we use cpp_define() in gcc-4_3-trunk/gcc/c-cppbuiltin.c to add "__FLOAT_STORE__" for -ffloat-store. We should also fix the code so the math is as accurate as the standard provides for; regardless of use of -ffloat-store or -ffast-math, -msoft-float, -mfpmath=xyz, -msse*, -minline-float-*, -minline-sqrt-*, or anything else. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32180