This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/38588] strict-aliasing error
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Dec 2008 01:59:02 -0000
- Subject: [Bug c/38588] strict-aliasing error
- References: <bug-38588-17101@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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