[Bug middle-end/34678] Optimization generates incorrect code with -frounding-math option (#pragma STDC FENV_ACCESS not implemented)
nmm1 at cam dot ac.uk
gcc-bugzilla@gcc.gnu.org
Tue Jan 14 15:13:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34678
--- Comment #27 from Nick Maclaren <nmm1 at cam dot ac.uk> ---
On Jan 14 2014, vincent-gcc at vinc17 dot net wrote:
>
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34678
>
>> What "explicit definition of behavior" is there for the case when
>> STDC FENV_ACCESS is set to "on" but __STDC_IEC_559__ is not set to one?
>
>The behavior is defined. The standard says, e.g. for C99:
>
>7.6.1 The FENV_ACCESS pragma
>
>The FENV_ACCESS pragma provides a means to inform the implementation when a
>program might access the floating-point environment to test floating-point
>status flags or run under non-default floating-point control modes.
I suggest looking up the word "explicit" in a dictionary.
Unless __STDC_IEC_559__ is set to 1, what modes and flags exist (and,
even more importantly) what there semantics are) is at best implicit and
more realistically unspecified - see footnote 204 for a clear statement of
that.
Have you ever implemented a C system for an architecture with non-IEEE
arithmetic but with modes and flags? Because I have, and I have used
several others.
>> As there is none, it is undefined behaviour. gcc can therefore do
>> whatever it likes.
>
>No.
You are quite simply wrong.
Regards,
Nick Maclaren.
More information about the Gcc-bugs
mailing list