diff options
author | rus <rus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-05-11 16:20:08 +0000 |
---|---|---|
committer | rus <rus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-05-11 16:20:08 +0000 |
commit | e6fa0ea601965ab7a19c55ca870bdb2cdebaf324 (patch) | |
tree | f0873ca8d26c98fe6770ac353fa336c975e5e22a /gcc/flags.h | |
parent | d107f37af105e690ccc27609ac1e7ed760b289e9 (diff) | |
download | gcc-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/flags.h')
-rw-r--r-- | gcc/flags.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/flags.h b/gcc/flags.h index 98396f04091..07e5ec358b8 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -122,6 +122,15 @@ extern bool extra_warnings; extern void set_Wunused (int setting); +/* Used to set the level of -Wstrict-aliasing, when no level is specified. + The external way to set the default level is to use + -Wstrict-aliasing=level. + ONOFF is assumed to take value 1 when -Wstrict-aliasing is specified, + and 0 otherwise. After calling this function, wstrict_aliasing will be + set to the default value of -Wstrict_aliasing=level. */ + +extern void set_Wstrict_aliasing (int onoff); + /* Nonzero means warn about any objects definitions whose size is larger than N bytes. Also want about function definitions whose returned values are larger than N bytes. The value N is in `larger_than_size'. */ |