[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-patches
Subject:    Re: [PATCH][RFC] Add a subset of -Warray-bounds warnings to C/C++ front ends
From:       Dirk Mueller <dmueller () suse ! de>
Date:       2008-04-08 14:31:09
Message-ID: 200804081631.09848.dmueller () suse ! de
[Download RAW message or body]

On Friday 04 April 2008, Simon Baldwin wrote:

> Attached below is a modest patch to provide a subset of the -Warray-bounds
> warnings from tree-vrp.c in the C and C++ front ends.  

Is there a reason you haven't implemented that in c-common.c with hooks in the 
different frontends calling it?

 dg-warning "array subscript" } */

> -    h(sizeof a[-1]);
> +    h(sizeof a[-1]);       /* { dg-warning "array subscript" } */

I'm not sure it should be warning here, and I think it would be possible to 
suppress the warning here. 


Thanks,
Dirk

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic