This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/42908] gcc -O2 -Wall doesn't warn about strict aliasing
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2010 22:03:53 -0000
- Subject: [Bug c/42908] gcc -O2 -Wall doesn't warn about strict aliasing
- References: <bug-42908-18727@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2010-01-30 22:03 -------
$ gcc-4.4 -S t.c -O2 -Wall -Wstrict-aliasing=2
t.c: In function ?main?:
t.c:15: warning: dereferencing type-punned pointer might break strict-aliasing
rules
you need to enable level 2 to get warnings about this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42908