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: Jakub Jelinek <jakub at redhat dot com>
- To: Rafael Espindola <espindola at google dot com>
- Cc: 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 13:27:48 +0200
- 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>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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.
Jakub