This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/34803] wrong code for dereferencing type-punned pointer



------- Comment #3 from gin at mo dot msk dot ru  2008-01-16 00:49 -------
Subject: Re:  wrong code for dereferencing type-punned pointer

> obviously violating c aliasing rules here.

Certainly.  Was quite explicit about that:

  That is,
  `-fno-strict-aliasing' no longer disables optimizations that require
  strict aliasing rules in code.

To reproduce compiler (still) doing such an optimizations (and
breaking code), one has to violate aliasing rules.


Also confirming that one may factor these separate issues in the report.

. Compiler ignores `-fno-strict-aliasing'.  Expecting that can violate
aliasing rules, and tell compiler to allow that, by passing this
option.  The expectation is based on both option documentation and
earlier gcc versions actually doing so.

. Warning not issued, even when compiler does optimizations that
require code to conform to c strictest aliasing rules.

On request will confine this bug database entry to one of them, and
post another issue as separate bug database entry.


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]