aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/anon-struct10.C
blob: 9b01bf3fada61860cf58a8f6d3b580f90e5ef468 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR c++/101767
// { dg-do compile { target c++11 } }
// { dg-additional-options "-Wno-pedantic" }

typedef struct {
  struct {
    int x;
  };
  union {
    int y;
    float z;
  };
} S;

void foo(void)
{
  [[maybe_unused]] S a = {
    .x = 1,
    .y = 0
  };
}