2014-07-29 Ed Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / gcc / testsuite / gcc.dg / Wcxx-compat-7.c
blobbccbd1107b6c3c2b972a3f16272ace95c922f393
1 /* { dg-do compile } */
2 /* { dg-options "-Wc++-compat" } */
4 struct s1
6 enum e1 /* { dg-message "note: enum type defined here" } */
8 A, /* { dg-message "note: enum constant defined here" } */
10 } f1;
11 struct s2 /* { dg-message "note: struct defined here" } */
13 struct s3 /* { dg-message "note: struct defined here" } */
15 enum e1 f3;
16 struct s1 *p1;
17 struct s2 *p2;
18 struct s3 *p3;
19 } f2;
20 union u1 /* { dg-message "note: union defined here" } */
22 int f4;
23 } f5;
24 struct s3 f6;
25 } f7;
26 struct s2 f8;
27 enum e1 f9;
30 struct s1 v1;
31 enum e1 v2; /* { dg-warning "not visible in C\[+\]\[+\]" } */
32 struct s2 v3; /* { dg-warning "not visible in C\[+\]\[+\]" } */
33 struct s3 v4; /* { dg-warning "not visible in C\[+\]\[+\]" } */
34 union u1 v5; /* { dg-warning "not visible in C\[+\]\[+\]" } */
35 int i = A; /* { dg-warning "not visible in C\[+\]\[+\]" } */