http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47796
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |jakub at gcc dot gnu.org Resolution| |INVALID --- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-21 08:29:03 UTC --- Undefined behavior means anything can happen, so wondering why undefined behavior doesn't always behave the same doesn't make any sense. And, both gcc 4.4.5 and 4.5.2 do warn about this with -Wstrict-aliasing=1 -O2: pr47796.c:25: warning: dereferencing type-punned pointer might break strict-aliasing rules pr47796.c:31: warning: dereferencing type-punned pointer might break strict-aliasing rules Please stop reopening this.