This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR/8268: implement compile time array subscript checking
- From: "Manuel López-Ibáñez" <lopezibanez at gmail dot com>
- To: "Dirk Mueller" <dmuell at gmx dot net>
- Cc: gcc-patches at gcc dot gnu dot org, "Roger Sayle" <roger at eyesopen dot com>, "Richard Guenther" <richard dot guenther at gmail dot com>, "Gabriel Dos Reis" <gdr at cs dot tamu dot edu>
- Date: Tue, 16 Jan 2007 14:16:32 +0000
- Subject: Re: [PATCH] Fix PR/8268: implement compile time array subscript checking
- References: <Pine.LNX.4.44.0701130958480.27791-100000@www.eyesopen.com> <200701161408.49061.dmuell@gmx.net>
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?