* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / pr79118.C
blob5db22a96dd4088035026df6bb829be97ae23269d
1 // { dg-do compile { target c++11 } }
2 // { dg-additional-options { -Wno-pedantic } }
3 // PR c++/79118 failure to check initialization of anonymous members.
5 struct One
7   union
8   {
9     int a;
10     int b;
11   };
13   constexpr One () : a(), b() {} // { dg-error "multiple" }
14   constexpr One (int) : a() {}
15   constexpr One (unsigned) : b () {}
16   constexpr One (void *) {} // { dg-error "exactly one" }
19 One a ();
20 One b (0);
21 One c (0u);
22 One d ((void *)0);
24 struct Two
26   struct
27   {
28     int a;
29     int b;
30   };
32   constexpr Two () : a(), b() {}
33   constexpr Two (int) : a() {} // { dg-error "b' must be initialized" }
34   constexpr Two (unsigned) : b () {} // { dg-error "a' must be initialized" }
35   constexpr Two (void *) {} // { dg-error "a' must be initialized" }
36    // { dg-error "b' must be initialized" "" { target *-*-* } .-1 }
39 Two e ();
40 Two f (0);
41 Two g (0u);
42 Two h ((void *)0);