Debian Codegraph @

gcc/testsuite/g++.dg/ext/anon-struct10.C

raw
1 // PR c++/101767
2 // { dg-do compile { target c++11 } }
3 // { dg-additional-options "-Wno-pedantic" }
4
5 typedef struct {
6 struct {
7 int x;
8 };
9 union {
10 int y;
11 float z;
12 };
13 } S;
14
15 void foo(void)
16 {
17 [[maybe_unused]] S a = {
18 .x = 1,
19 .y = 0
20 };
21 }