aboutsummaryrefslogtreecommitdiff
path: root/gcc/common.opt
diff options
context:
space:
mode:
authorDirk Mueller <dmueller@suse.de>2007-01-18 13:00:33 +0000
committerDirk Mueller <mueller@gcc.gnu.org>2007-01-18 13:00:33 +0000
commit590b1f2d1f60b909e45e9b47f8a3e71a608dee20 (patch)
tree2d86bde5e9f2aefe4b2d4556eac1f4327318abb4 /gcc/common.opt
parenteedeea04da0bbdf7e975a31c9c55f3929657b909 (diff)
downloadgcc-590b1f2d1f60b909e45e9b47f8a3e71a608dee20.zip
gcc-590b1f2d1f60b909e45e9b47f8a3e71a608dee20.tar.gz
gcc-590b1f2d1f60b909e45e9b47f8a3e71a608dee20.tar.bz2
· Richard Guenther <rguenther@suse.de>
2007-01-18 Dirk Mueller <dmueller@suse.de> · Richard Guenther <rguenther@suse.de> · PR diagnostic/8268 · * doc/invoke.texi (Warray-bounds): Document -Warray-bounds. · * common.opt (Warray-bounds): Add new warning option. · * c-opts.c (c_common_handle_option): Define -Warray-bounds · if -Wall is given. * Makefile.in: make tree-vrp.o depend on toplev.h · * tree-vrp.c (vrp_finalize): Call check_array_refs if -Warray-bounds · is enabled. · (check_array_refs, check_array_bounds, check_array_ref): New. · * gcc.dg/Warray-bounds.c: New testcase. * gcc.dg/Warray-bounds-2.c: New testcase. * g++.dg/warn/Warray-bounds.C: New testcase. * g++.dg/warn/Warray-bounds-2.C: New testcase. From-SVN: r120898
Diffstat (limited to 'gcc/common.opt')
-rw-r--r--gcc/common.opt4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/common.opt b/gcc/common.opt
index e237fc1..109de7b 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -61,6 +61,10 @@ Walways-true
Common Var(warn_always_true)
Warn about comparisons that always evaluate to true
+Warray-bounds
+Common Var(warn_array_bounds)
+Warn if an array is accessed out of bounds
+
Wattributes
Common Var(warn_attributes) Init(1)
Warn about inappropriate attribute usage