1 /* { dg-do compile } */
2 /* { dg-options "-Wc++-compat" } */
5 extern void f2 (enum E1
);
14 f2 (0); /* { dg-warning "invalid in C\[+\]\[+\]" } */
16 f2 (D
); /* { dg-warning "invalid in C\[+\]\[+\]" } */
17 f2 (a
); /* { dg-warning "invalid in C\[+\]\[+\]" } */
19 f2 (e2
); /* { dg-warning "invalid in C\[+\]\[+\]" } */
28 struct s1
{ enum E1 e1
: 3; };
29 struct s2
{ enum E2 e2
: 3; };
32 f3 (struct s1 sv1
, struct s2 sv2
)
35 f2 (sv2
.e2
); /* { dg-warning "invalid in C\[+\]\[+\]" } */
39 f4 (struct s1
*pv1
, struct s2
*pv2
)
42 f2 (pv2
->e2
); /* { dg-warning "invalid in C\[+\]\[+\]" } */
45 /* Match all extra informative notes. */
46 /* { dg-message "note: expected '\[^\n'\]*' but argument is of type '\[^\n'\]*'" "note: expected" { target *-*-* } 0 } */