1 /* Test C2x enumerations with fixed underlying type together with GNU
2 extensions: an enum cannot be forward declared without a fixed underlying
3 type and then declared or defined with one. */
4 /* { dg-do compile } */
5 /* { dg-options "-std=gnu2x" } */
6
7 enum e1;
8 enum e1 : int; /* { dg-error "'enum' declared both with and without fixed underlying type" } */
9
10 enum e2;
11 enum e2 : long { A }; /* { dg-error "'enum' declared both with and without fixed underlying type" } */