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/38588] strict-aliasing error



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-12-21 01:58 -------
No this is working as designed.  GCC does warn about this case.
t.c:6: warning: dereferencing type-punned pointer will break strict-aliasing
rules


Now in 4.4.0 and above, the same result will happen at -O1 and -O2 because of
another optimization that allows for the compiler to remove the alias violation
in the IR.

*** This bug has been marked as a duplicate of 21920 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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