This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/8268] no compile time array index checking
- From: "mueller at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2007 17:18:00 -0000
- Subject: [Bug c/8268] no compile time array index checking
- References: <bug-8268-1563@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #45 from mueller at gcc dot gnu dot org 2007-01-30 17:17 -------
Subject: Bug 8268
Author: mueller
Date: Tue Jan 30 17:17:39 2007
New Revision: 121346
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121346
Log:
backport from mainline:
2007-01-21 Dirk Mueller <dmueller@suse.de>
PR bootstrap/30511
* tree-vrp.c (check_array_bounds): do not warn
about ADDR_EXPR's of ARRAY_REF's which are immediately
used in binary expressions.
2007-01-19 Dirk Mueller <dmueller@suse.de>
* config/i386.h (CONDITIONAL_REGISTER_USAGE): Store
result of PIC_OFFSET_TABLE_REGNUM in temporary variable to avoid
duplicate evaluation.
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.
Added:
branches/suse/gcc-4_2-branch/gcc/testsuite/g++.dg/warn/Warray-bounds-2.C
- copied unchanged from r120898,
trunk/gcc/testsuite/g++.dg/warn/Warray-bounds-2.C
branches/suse/gcc-4_2-branch/gcc/testsuite/g++.dg/warn/Warray-bounds.C
- copied unchanged from r120898,
trunk/gcc/testsuite/g++.dg/warn/Warray-bounds.C
branches/suse/gcc-4_2-branch/gcc/testsuite/gcc.dg/Warray-bounds-2.c
- copied unchanged from r120898,
trunk/gcc/testsuite/gcc.dg/Warray-bounds-2.c
branches/suse/gcc-4_2-branch/gcc/testsuite/gcc.dg/Warray-bounds.c
- copied unchanged from r120898,
trunk/gcc/testsuite/gcc.dg/Warray-bounds.c
Modified:
branches/suse/gcc-4_2-branch/gcc/Makefile.in
branches/suse/gcc-4_2-branch/gcc/c-opts.c
branches/suse/gcc-4_2-branch/gcc/common.opt
branches/suse/gcc-4_2-branch/gcc/config/i386/i386.h
branches/suse/gcc-4_2-branch/gcc/doc/invoke.texi
branches/suse/gcc-4_2-branch/gcc/tree-vrp.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8268