summaryrefslogtreecommitdiff
path: root/gcc/c-opts.c
diff options
context:
space:
mode:
authorrus <rus@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-11 16:20:08 +0000
committerrus <rus@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-11 16:20:08 +0000
commite6fa0ea601965ab7a19c55ca870bdb2cdebaf324 (patch)
treef0873ca8d26c98fe6770ac353fa336c975e5e22a /gcc/c-opts.c
parentd107f37af105e690ccc27609ac1e7ed760b289e9 (diff)
downloadgcc-e6fa0ea601965ab7a19c55ca870bdb2cdebaf324.tar.gz
gcc/
* Makefile.in (OBJS-common): Add tree-ssa-alias-warnings.o. * c-common.c (strict_aliasing_warning): Modify -Wstrict-aliasing logic. * c-common.h (strict_aliasing_warning): Change return type. * c-opts.c (c_common_handle_option): Add call to set_Wstrict_aliasing. * c-typeck.c (build_indirect_ref): Add call to strict_aliasing_warning. (build_c_cast): Condition call to strict_aliasing_warning. * doc/invoke.texi: Update description of -Wstrict-aliasing[=n]. * flags.h (set_Wstrict_aliasing): Declare. * opts.c (set_Wstrict_alising): Define, add call to. * tree-flow.h (strict_aliasing_warning_backend): Declare. * tree-ssa-alias-warnings.c: New file. * tree-ssa-alias.c (compute_may_aliases): Add call to strict_aliasing_warning_backend. gcc/cp * cp/typeck.c (build_indirect_ref): Add call to strict_aliasing_warning. (build_reinterpret_cast_1): Condition call to strict_aliasing_warning. gcc/testsuite * gcc.dg/Wstrict-aliasing-bogus-const-ptr-nonconst-ptr.c: New test. * gcc.dg/Wstrict-aliasing-bogus-never-dereferenced.c: New test. * gcc.dg/Wstrict-aliasing-bogus-struct-included.c: New test. * gcc.dg/Wstrict-aliasing-converted-assigned.c: New test. * gcc.dg/Wstrict-aliasing-float-ptr-int-obj.c: New test. * gcc.dg/alias-1.c: Update option: -Wstrict-aliasing=2. * gcc.dg/alias-9.c: Update option: -Wstrict-aliasing=2. * g++.dg/warn/Wstrict-aliasing-7.C: Update option: -Wstrict-aliasing=2. * g++.dg/warn/Wstrict-aliasing-bogus-base-derived.C: New test. * g++.dg/warn/Wstrict-aliasing-bogus-char-1.C: New test. * g++.dg/warn/Wstrict-aliasing-bogus-const.C: New test. * g++.dg/warn/Wstrict-aliasing-bogus-nested-arrays.C: New test. * g++.dg/warn/Wstrict-aliasing-bogus-signed-unsigned.C: New test. * g++.dg/warn/Wstrict-aliasing-bogus-struct-included.C: New test. * g++.dg/warn/Wstrict-aliasing-bogus-union.C: New test. * g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124622 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r--gcc/c-opts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index a41362a9829..ed832afa788 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -400,7 +400,7 @@ c_common_handle_option (size_t scode, const char *arg, int value)
if (c_dialect_cxx ())
warn_sign_compare = value;
warn_switch = value;
- warn_strict_aliasing = value;
+ set_Wstrict_aliasing (value);
warn_address = value;
warn_strict_overflow = value;
warn_array_bounds = value;