aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/union2.C
blob: 3a2d93b255633b1b5566a075c5915e622e294476 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/15938
// { dg-do compile }
// { dg-options "" }

typedef union
{
  struct { int i; };
  struct { char c; };
} A;

A a = { 0 };
A b = {{ 0 }};
A c = {{{ 0 }}};    // { dg-error "braces" "" { target c++98_only } }
A d = {{{{ 0 }}}};  // { dg-error "braces" }