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