diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-08 19:20:18 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-08 19:20:18 +0000 |
commit | 812f3fa90c4630bf0039b56f457951cf08978ed6 (patch) | |
tree | 931ded0405225a7ea610ab31e640db7544deb6c2 /gcc/testsuite/gcc.dg/alias-1.c | |
parent | a652006b6236ab2ed766404648cb33d11aa6de06 (diff) | |
download | gcc-812f3fa90c4630bf0039b56f457951cf08978ed6.tar.gz |
gcc:
* c-opts.c (c_common_decode_option): Add warn_strict_aliasing to
-Wall.
* c-typeck.c (build_c_cast): Use warn_strict_aliasing, tweak
message.
* flags.h (warn_strict_aliasing): Declare.
* toplev.c (warn_strict_aliasing): Define.
(lang_independent_options): Add it.
* doc/invoke.texi (-Wstrict-aliasing): Document it.
testsuite:
* gcc.dg/alias-1.c: Tweak expected warning.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57938 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/alias-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/alias-1.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.dg/alias-1.c b/gcc/testsuite/gcc.dg/alias-1.c index 71056e9b6d8..a723083672c 100644 --- a/gcc/testsuite/gcc.dg/alias-1.c +++ b/gcc/testsuite/gcc.dg/alias-1.c @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-W -fstrict-aliasing" } +// { dg-options "-Wstrict-aliasing -fstrict-aliasing" } // Copyright (C) 2002 Free Software Foundation, Inc. // Contributed by Nathan Sidwell 29 Sep 2002 <nathan@codesourcery.com> @@ -19,9 +19,9 @@ YYSTYPE addSibMacro( YYSTYPE list ) { - tDefEntry** ppT = (tDefEntry**)&list; // { dg-warning "type punning cast" "" } + tDefEntry** ppT = (tDefEntry**)&list; // { dg-warning "type-punned pointer" "" } - struct incomplete *p = (struct incomplete *)&list; // { dg-warning "type punning to incomplete" "" } + struct incomplete *p = (struct incomplete *)&list; // { dg-warning "type-punning to incomplete" "" } return list; } |