[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:       Mark Mitchell <mark () codesourcery ! com>
Date:       2008-04-27 0:43:36
Message-ID: 4813CC38.40907 () codesourcery ! com
[Download RAW message or body]

Simon Baldwin wrote:
> Thanks to a well targeted pointer from Tom Tromey, I've now added the 
> extra logic to suppress warnings about "sizeof(a[-1])" in the C and C++ 
> frontends.  Attached is the revised version.

Thanks for following up.  I think this is a worthwhile patch.

> +This option performs a subset of checks in unoptimized compilations, and
> +stricter checking when @option{-ftree-vrp} is active
>  (default for -O2 and above). 

I think "stricter" could be made more explicit.  How about something like:

This option detects some cases of out-of-bounds accesses in unoptimized 
compilations.  More cases are detected when @option{-ftree-vrp} is 
enabled.  (The @option{-ftree-vrp} option is enabled automatically when 
compiling with @option{-O2} or higher optimization options.)

Joseph, do you have any comments on the C changes?  Simon, if you do not 
hear otherwise from Joseph within 72 hours, this patch is OK.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
[prev in list] [next in list] [prev in thread] [next in thread] 

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