From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27293 invoked by alias); 20 Jan 2008 16:13:50 -0000 Received: (qmail 27284 invoked by uid 22791); 20 Jan 2008 16:13:50 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 20 Jan 2008 16:13:33 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m0KGDUbA003624; Sun, 20 Jan 2008 11:13:30 -0500 Received: from zebedee.littlepinkcloud.COM (vpn-14-3.rdu.redhat.com [10.11.14.3]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m0KGDTIv026181; Sun, 20 Jan 2008 11:13:30 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by zebedee.littlepinkcloud.COM (8.13.8/8.13.5) with ESMTP id m0KGDRLq024109; Sun, 20 Jan 2008 16:13:29 GMT Message-ID: <47937327.6010105@redhat.com> Date: Mon, 21 Jan 2008 21:59:00 -0000 From: Andrew Haley User-Agent: Thunderbird 1.5.0.12 (X11/20071019) MIME-Version: 1.0 To: Russell Shaw CC: gcc-help@gcc.gnu.org Subject: Re: warning: comparison with string literal results in unspecified behaviour References: <47934A5D.2080608@netspace.net.au> In-Reply-To: <47934A5D.2080608@netspace.net.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg00193.txt.bz2 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.