aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorSimon Baldwin <simonb@google.com>2008-05-02 20:01:31 +0000
committerSimon Baldwin <simonb@gcc.gnu.org>2008-05-02 20:01:31 +0000
commite4d355154880463416ba21be979aa77654d727a0 (patch)
tree7a9abc71059af57af9a976cfa19589fee9e462be /gcc/doc
parentbb1418c1b43a95548515bffb8d4a54a173f2a49d (diff)
downloadgcc-e4d355154880463416ba21be979aa77654d727a0.zip
gcc-e4d355154880463416ba21be979aa77654d727a0.tar.gz
gcc-e4d355154880463416ba21be979aa77654d727a0.tar.bz2
Rolled back the following changes made in revision 134865:
* c-common.h (warn_array_subscript_range): New function. * c-common.c (warn_array_subscript_range): Ditto. * tree-vrp.c (check_array_ref): Corrected code to agree with comment, ignoring only arrays of size 0 or size 1. * c-typeck.c (build_array_ref): Call warn_array_subscript_range. * testsuite/gcc.dg/Warray-bounds.c: Updated for frontend warnings, additional tests for arrays of size 0 and size 1. * testsuite/g++.dg/warn/Warray-bounds.c: Ditto. * testsuite/gcc.dg/Warray-bounds-noopt.c: New testcase. * testsuite/g++.dg/warn/Warray-bounds-noopt.c: Ditto. * typeck.c (build_array_ref): Call warn_array_subscript_range. From-SVN: r134889
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index c147219..dfd22af 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -2679,7 +2679,7 @@ Options} and @ref{Objective-C and Objective-C++ Dialect Options}.
@option{-Wall} turns on the following warning flags:
@gccoptlist{-Waddress @gol
--Warray-bounds @r{(some checks, but more complete with} @option{-O2}@r{)} @gol
+-Warray-bounds @r{(only with} @option{-O2}@r{)} @gol
-Wc++0x-compat @gol
-Wchar-subscripts @gol
-Wimplicit-int @gol
@@ -3382,10 +3382,9 @@ false positives.
@item -Warray-bounds
@opindex Wno-array-bounds
@opindex Warray-bounds
-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.)
+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. This warning is enabled by @option{-Wall}.
@item -Wno-div-by-zero
@opindex Wno-div-by-zero