https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65892

--- Comment #24 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 2 Nov 2016, txr at alumni dot caltech.edu wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65892
> 
> --- Comment #22 from Tim Rentsch <txr at alumni dot caltech.edu> ---
> [responding to comments from rguent...@suse.de in Comment 20]
> 
> > GCC already implements this if you specify -fno-strict-aliasing.
> 
> The main point of my comments is that the ISO C standard requires
> the behavior in this case (and similar cases) be defined and not
> subject to any reordering.  In other words the result must be the
> same as an unoptimized version.  If a -fstrict-aliasing gcc /does/
> transform the code so that the behavior is not the same as an
> unoptimized version, then gcc is not a conforming implementation.

GCC has various optimization options that make it a not strictly
conforming implementation (-ffast-math for example), various
GNU extensions to the language, etc.

> Or is it your position that gcc is conforming only when operated
> in the -fno-strict-aliasing mode?  That position seems contrary to
> the documented description of the -fstrict-aliasing option.

Well, N685 is still disputed in this bug.  I was just pointing out
that GCC has a switch to make it conforming to your interpretation
of the standard (and this switch is the default at -O0 and -O1).

Reply via email to