This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/7776] const char* p = "foo"; if (p == "foo") ... is compiled without warning!


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]