This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: warning: comparison with string literal results in unspecified behaviour
- From: Andrew Haley <aph at redhat dot com>
- To: Russell Shaw <rjshaw at netspace dot net dot au>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 20 Jan 2008 16:13:27 +0000
- Subject: Re: warning: comparison with string literal results in unspecified behaviour
- References: <47934A5D.2080608@netspace.net.au>
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.