warning: comparison with string literal results in unspecified behaviour

Andrew Haley aph@redhat.com
Mon Jan 21 21:59:00 GMT 2008


Russell Shaw wrote:
> How do i disable that? My code explicitly compares string pointers.

The best way is to intern all your strings.  String interning is a
fairly common efficient technique and you can look it up in Google.

Andrew.




More information about the Gcc-help mailing list