[Bug middle-end/34678] Optimization generates incorrect code with -frounding-math option (#pragma STDC FENV_ACCESS not implemented)

vincent-gcc at vinc17 dot net gcc-bugzilla@gcc.gnu.org
Fri Jan 10 11:40:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34678

--- Comment #24 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
(In reply to Nick Maclaren from comment #23)
> If __STDC_IEC_559__ is unset or does not have the value 1, setting
> STDC FENV_ACCESS to "on" is undefined behaviour (see 6.10.8.3, 7.6 and
> Annex F), unless the implementation explicitly chooses to extend the
> language to support it.

You're wrong. The C standard doesn't say that.

6.10.8.3 says: "__STDC_IEC_559__ The integer constant 1, intended to indicate
conformance to the specifications in annex F (IEC 60559 floating-point
arithmetic)." and nothing about STDC FENV_ACCESS.

In 7.6, only 7.6.1 is specifically about the FENV_ACCESS pragma, and it
specifies under which conditions the behavior is undefined, but nothing related
to __STDC_IEC_559__ and Annex F.

Annex F doesn't apply in the case __STDC_IEC_559__ is unset.


More information about the Gcc-bugs mailing list