This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/7776] const char* p = "foo"; if (p == "foo") ... is compiled without warning!
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jun 2005 13:44:59 -0000
- Subject: [Bug middle-end/7776] const char* p = "foo"; if (p == "foo") ... is compiled without warning!
- References: <20020830090600.7776.udbz@rz.uni-karlsruhe.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pluto at agmk dot net 2005-06-24 13:44 -------
(In reply to comment #9)
> A revised patch, allowing equality and inequality comparisons against NULL,
yet
> retaining warnings for things like 'if ("foo" > 0)' and 'if ("foo" ==
"bar")'
> was posted here: http://gcc.gnu.org/ml/gcc-patches/2005-06/msg01177.html
>
with this patch I get an ice at amd64:
(..)
-c ../../gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
In file included from ../../gcc/unwind-dw2.c:256:
../../gcc/config/i386/linux-unwind.h:
In function 'x86_64_fallback_frame_state':
../../gcc/config/i386/linux-unwind.h:55: warning: dereferencing type-punned
pointer will break strict-aliasing rules
../../gcc/unwind.inc: In function '_Unwind_ForcedUnwind':
../../gcc/unwind.inc:215: internal compiler error: in create_pre_exit,
at mode-switching.c:350
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7776