* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / desig1.C
blob393f5309f7f8dcae5c31fdc50378b5f58c423245
1 // PR c++/58882
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-pedantic" }
5 struct A
7   constexpr operator int() const { return 0; }
8 };
10 int a[] = { [A()] = 0 };        // { dg-warning "does not allow C99 designated initializers" }
12 enum E { e0 };
14 struct B
16   constexpr operator E() const { return E::e0; }
19 int b[] = { [B()] = 0 };        // { dg-warning "does not allow C99 designated initializers" }
21 enum class SE { se0 };
23 struct C
25   constexpr operator SE() const { return SE::se0; }
28 int c[] = { [C()] = 0 }; // { dg-error "integral constant-expression" }
29                          // { dg-warning "does not allow C99 designated initializers" "" { target *-*-* } .-1 }