From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22043 invoked by alias); 30 Aug 2002 17:36:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 22021 invoked by uid 71); 30 Aug 2002 17:36:01 -0000 Date: Fri, 30 Aug 2002 11:06:00 -0000 Message-ID: <20020830173601.22020.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Andrew Pinski Subject: Re: c/7776: const char* p = "foo"; if (p == "foo") ... is compiled without warning! Reply-To: Andrew Pinski X-SW-Source: 2002-08/txt/msg00638.txt.bz2 List-Id: The following reply was made to PR c/7776; it has been noted by GNATS. From: Andrew Pinski To: udbz@rz.uni-karlsruhe.de Cc: gcc-gnats@gcc.gnu.org Subject: Re: c/7776: const char* p = "foo"; if (p == "foo") ... is compiled without warning! Date: Fri, 30 Aug 2002 13:35:21 -0400 Are you asking for a warning so that the warning would suggest strcmp? The code you provide does make sense to check for if the two occurrences of "foo" are the same because the C standard does not say if they have to be the same. Thanks, Andrew Pinski