[Bug middle-end/7776] const char* p = "foo"; if (p == "foo") ... is compiled without warning!
pluto at agmk dot net
gcc-bugzilla@gcc.gnu.org
Fri Jun 24 13:45:00 GMT 2005
------- 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
More information about the Gcc-bugs
mailing list