This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR c++/35652 [4.2/4.3/4.4 Regression] offset warning should be given in the front-end
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Rafael Espindola <espindola at google dot com>, Manuel López-Ibáñez <lopezibanez at gmail dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>, Mark Mitchell <mark at codesourcery dot com>, Jason Merrill <jason at redhat dot com>, Nathan Sidwell <nathan at codesourcery dot com>
- Date: Mon, 30 Mar 2009 11:03:13 -0700
- Subject: Re: PR c++/35652 [4.2/4.3/4.4 Regression] offset warning should be given in the front-end
- References: <6c33472e0811030736i272ea3a9r996e4b5a5fd3b3c7@mail.gmail.com> <38a0d8450903300356o53497c14q68741cf1871a8d14@mail.gmail.com> <20090330112748.GB3160@tyan-ft48-01.lab.bos.redhat.com>
On Mon, Mar 30, 2009 at 4:27 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Mar 30, 2009 at 11:56:03AM +0100, Rafael Espindola wrote:
>> With this patch I now get a warning for
>> ------------------------------------------
>> #include <string.h>
>>
>> int f(char *s)
>> {
>> ? return strcmp (s, "");
>> }
>> ------------------------------------
>>
>> test.c: In function 'f':
>> test.c:5: error: offset '2' outside bounds of constant string
>> test.c:5: error: offset '3' outside bounds of constant string
>
> Yeah, got a bunch of reports about this too. ?I think the patch should be
> reverted at least on the 4.4 branch.
>
I think this is
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36902
--
H.J.