2 enum a
{ B
}; /* { dg-bogus "nested redefinition" } */
3 /* { dg-error "redeclaration of 'enum a'" "" { target *-*-* } .-1 } */
5 enum empty
{}; /* { dg-error "empty enum is invalid" } */
6 enum empty
{}; /* { dg-bogus "nested redefinition" } */
7 /* { dg-error "empty enum is invalid" "" { target *-*-* } .-1 } */
10 C1
= sizeof(enum nested_first
{ C1a
}), /* { dg-error "nested redefinition of 'enum nested_first" } */
11 C2
= sizeof(enum nested_first
{ C2a
}) /* { dg-error "redeclaration of 'enum nested_first'" "" } */
16 D2
= sizeof(enum nested_second
{ D2a
}), /* { dg-error "nested redefinition of 'enum nested_second" } */
17 D3
= sizeof(enum nested_second
{ D3a
}) /* { dg-error "redeclaration of 'enum nested_second'" "" } */
20 enum nested_repeat
{ E
};
21 enum nested_repeat
{ /* { dg-error "redeclaration of 'enum nested_repeat'" "" } */
22 F
= sizeof(enum nested_repeat
{ Fa
}) /* { dg-error "nested redefinition of 'enum nested_repeat" } */
26 G1
= sizeof(enum nested_empty
{}), /* { dg-error "nested redefinition of 'enum nested_empty" } */
27 /* { dg-error "empty enum is invalid" "" { target *-*-* } .-1 } */
28 G2
= sizeof(enum nested_empty
{ G2a
})