Created attachment 36807 [details] example of C program based on the STDC FP_CONTRACT pragma The following applies to: gcc (Debian 20151030-1) 6.0.0 20151031 (experimental) [trunk revision 229615] When I compile a C program like the attached one with #pragma STDC FP_CONTRACT OFF in a standard mode, the pragma is now taken into account as expected (see PR37845 / r204460). However, in a non-standard mode such as the default gnu99 (?), it is not taken into account (a FMA is generated for an operation like x*y+z), but one gets no warnings either. One should have one of the following behaviors in non-standard modes: 1. The pragma is taken into account. 2. The pragma is not taken into account, but one gets a warning (making it unknown in non-standard modes is OK). If possible, (1) is probably the best choice, at least in gnu99 and gnu11 modes, as the user may want to disable contraction for some floating-point algorithms while still being able to use specific GNU extensions.
Well, actually the pragma is ignored in all cases. The fix was to set the default to OFF in the standard modes. So, currently, one should get a warning in non-standard modes.
Unknown pragmas are diagnosed with -Wunknown-pragmas (part of -Wall).
Sorry, I forgot that I had an alias gcc='gcc -Wall', so that I got a warning for gcc, but not for gcc-snapshot. I've now changed by config to define such an alias for each GCC command found in $PATH. I'm closing this bug since nothing has changed concerning the warnings compared to old GCC versions.