Merge to HEAD at tree-cleanup-merge-20041024 .
[official-gcc.git] / gcc / testsuite / gcc.dg / alias-1.c
blob82dbc9efbf843c8d45d4fe5adb529d9fdc69670d
1 // { dg-do compile }
2 // { dg-options "-Wstrict-aliasing -fstrict-aliasing" }
4 // Copyright (C) 2002 Free Software Foundation, Inc.
5 // Contributed by Nathan Sidwell 29 Sep 2002 <nathan@codesourcery.com>
7 // 8083. warn about odd casts
9 typedef int YYSTYPE;
10 typedef struct tDefEntry
12 unsigned t;
14 } tDefEntry;
15 struct incomplete;
18 YYSTYPE
19 addSibMacro(
20 YYSTYPE list )
22 tDefEntry** ppT = (tDefEntry**)&list; // { dg-warning "type-punned pointer will" "" }
24 struct incomplete *p = (struct incomplete *)&list; // { dg-warning "type-punning to incomplete" "" }
26 return list;