This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/44060] miscompilation with -Os on x86
- From: "bernhardloos at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 May 2010 14:57:26 -0000
- Subject: [Bug target/44060] miscompilation with -Os on x86
- References: <bug-44060-19159@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from bernhardloos at googlemail dot com 2010-05-10 14:57 -------
(In reply to comment #1)
> Try -Wstrict-aliasing.
>
It does produce a warning about dreferencing a type-punned pointer.
I tried to compile the snipped with both -fstrict-aliasing and
-fno-strict-aliasing and it doesn't produce a difference in the code. Not on
the i486 gcc4.5 nor on the gcc4.4 in fedora.
Busybox uses this in some places and it did work in the past, so it would be
really nice, if this could get fixed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44060