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] Fix PR/8268: implement compile time array subscript checking


On 16/01/07, Dirk Mueller <dmuell@gmx.net> wrote:

Patch below is bootstrapped and regtested against not entirely recent trunk (because of the current bootstrap failure) with no new failures.


+@item -Warray-bounds
+@opindex Warray-bounds
+This option is only active when @option{-ftree-vrp} is active
+(default for -O2 and above). It warns about subscripts to arrays
+that are always out of bounds.
+
@item -Wall
@opindex Wall
All of the above @samp{-W} options combined.  This enables all the

I think we should start adding the negative form in opindex as we have
discussed elsewhere:
+@opindex Wno-array-bounds

Also, the placemente is far from ideal, the option is not enabled by
Wall (despite of what your Changelog says), so it would be best to
place it after the sentence "All of the above  @samp{-W}  options
combined".

This also applies for the list of options:
-Wstrict-aliasing -Wstrict-aliasing=2 @gol
--Wstring-literal-comparison @gol
+-Wstring-literal-comparison -Warray-bounds @gol
-Wswitch  -Wswitch-default  -Wswitch-enum @gol

Why don't you put the option on its place in alphabetical order?


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