repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
gnu23-tag-enum-1.c
blob
ecf4d5e2bf7e8acd13465d15abb0097b40e74a33
1
/*
2
* { dg-do compile }
3
* { dg-options "-std=gnu23" }
4
*/
5
6
7
8
void
test2
(
void
)
9
{
10
enum
ee
*
a
;
11
enum
ee
{
F
=
2
} *
b
;
12
b
=
a
;
13
}
14
15
16
17
enum
A
{
B
=
7
}
y
;
18
19
void
g
(
void
)
20
{
21
// incomplete during construction
22
// this is a GNU extension because enum A is used
23
// before the type is completed.
24
25
enum
A
{
B
=
_Generic
(&
y
,
enum
A
*:
1
,
default
:
7
) };
26
_Static_assert
(
7
==
B
,
""
);
27
}
28
29