1 /* { dg-do compile } */
2 /* { dg-options "-Wc++-compat" } */
7 enum E1 v1b
= D
; /* { dg-warning "invalid in C\[+\]\[+\]" } */
8 enum E1 v1c
= 0; /* { dg-warning "invalid in C\[+\]\[+\]" } */
9 enum E1 v1d
= (enum E1
) 0;
10 enum E1 v1e
= (enum E2
) 0; /* { dg-warning "invalid in C\[+\]\[+\]" } */
17 D
, /* { dg-warning "invalid in C\[+\]\[+\]" } */
18 0, /* { dg-warning "invalid in C\[+\]\[+\]" } */
20 (enum E2
) 0, /* { dg-warning "invalid in C\[+\]\[+\]" } */
32 { D
}, /* { dg-warning "invalid in C\[+\]\[+\]" } */
33 { 0 }, /* { dg-warning "invalid in C\[+\]\[+\]" } */
35 { (enum E2
) 0 }, /* { dg-warning "invalid in C\[+\]\[+\]" } */
42 [ 4 ] = { .e1
= D
}, /* { dg-warning "invalid in C\[+\]\[+\]" } */
43 [ 3 ] = { .e1
= 0 }, /* { dg-warning "invalid in C\[+\]\[+\]" } */
44 [ 2 ] = { .e1
= (enum E1
) 0 },
45 [ 1 ] = { .e1
= (enum E2
) 0 }, /* { dg-warning "invalid in C\[+\]\[+\]" } */
57 { D
}, /* { dg-warning "invalid in C\[+\]\[+\]" } */
58 { 0 }, /* { dg-warning "invalid in C\[+\]\[+\]" } */
60 { (enum E2
) 0 }, /* { dg-warning "invalid in C\[+\]\[+\]" } */
67 [ 4 ] = { .e1
= D
}, /* { dg-warning "invalid in C\[+\]\[+\]" } */
68 [ 3 ] = { .e1
= 0 }, /* { dg-warning "invalid in C\[+\]\[+\]" } */
69 [ 2 ] = { .e1
= (enum E1
) 0 },
70 [ 1 ] = { .e1
= (enum E2
) 0 }, /* { dg-warning "invalid in C\[+\]\[+\]" } */
75 f(enum E1 e1
, enum E2 e2
, struct s1 vs1
, struct s1
*vp1
)
79 e2
, /* { dg-warning "invalid in C\[+\]\[+\]" } */
81 v2a
, /* { dg-warning "invalid in C\[+\]\[+\]" } */
90 { e2
}, /* { dg-warning "invalid in C\[+\]\[+\]" } */
92 { v2a
}, /* { dg-warning "invalid in C\[+\]\[+\]" } */
101 { e2
}, /* { dg-warning "invalid in C\[+\]\[+\]" } */
103 { v2a
}, /* { dg-warning "invalid in C\[+\]\[+\]" } */
111 /* Match all extra informative notes. */
112 /* { dg-message "near initialization for" "expected" { target *-*-* } 0 } */