[Bug c/38588] strict-aliasing error
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Dec 21 02:01:00 GMT 2008
------- 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
More information about the Gcc-bugs
mailing list