diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2002-10-08 19:20:18 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2002-10-08 19:20:18 +0000 |
commit | bf52f89914772b771d30abea73d2754268874d44 (patch) | |
tree | 931ded0405225a7ea610ab31e640db7544deb6c2 /gcc/testsuite/gcc.dg/alias-1.c | |
parent | b7932de6a1df9f98fff676ec00e67f9cfd806794 (diff) | |
download | gcc-bf52f89914772b771d30abea73d2754268874d44.zip gcc-bf52f89914772b771d30abea73d2754268874d44.tar.gz gcc-bf52f89914772b771d30abea73d2754268874d44.tar.bz2 |
c-opts.c (c_common_decode_option): Add warn_strict_aliasing to -Wall.
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.
From-SVN: r57938
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 71056e9..a723083 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; } |