https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45320
Marek Polacek changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
CC|
--- Comment #3 from strikosn at gmail dot com 2010-08-19 09:50 ---
Ok, I reviewed all cases and it seems that gcc always does the right thing. The
only problem left is that strict-aliasing warning Levels 2 and 3, of which
Level 3 is enabled by default, do not detect this particular case
--- Comment #2 from rguenth at gcc dot gnu dot org 2010-08-18 16:10 ---
At -O2 -Wstrict-aliasing=1 warns for me. I can't reproduce warnings
with -O0 or with -O1 because at those levels strict-aliasing isn't enabled.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45320
--- Comment #1 from paolo dot carlini at oracle dot com 2010-08-18 15:28
---
In general terms, ins't true that the warnings produced at -O0 are often much
weaker than when optimizing? I don't see anything aliasing-specific here...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4532