PR c++/35652 [4.2/4.3/4.4 Regression] offset warning should be given in the front-end

H.J. Lu hjl.tools@gmail.com
Mon Mar 30 19:47:00 GMT 2009


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.



More information about the Gcc-patches mailing list