This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][RFC] Add a subset of -Warray-bounds warnings to C/C++ front ends


Thanks all. Committed, with suggested doc/invoke.texi change, as revision 134865.


Mark Mitchell wrote:
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,



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]