* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-union5.C
blob57796664e01a6de183fc69e9ca89f288315a75b7
1 // PR c++/54922
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-pedantic" }
5 #define SA(X) static_assert(X,#X)
7 struct A
9   union {
10     union {
11       union {
12         unsigned char i;
13         int j;
14       };
15     };
16   };
18   constexpr A() : i(42) {}
21 constexpr A a;
22 SA((a.i == 42));
24 struct B
26   struct {
27     int h;
28     struct {
29       union {
30         unsigned char i;
31         int j;
32       };
33       int k;
34     };                          // { dg-warning "anonymous struct" }
35   };                            // { dg-warning "anonymous struct" }
36   int l;
38   constexpr B(): h(1), i(2), k(3), l(4) {}
41 constexpr B b;
42 SA((b.h == 1 && b.i == 2 && b.k == 3 && b.l == 4));