aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/error2.C
blob: 067e7def0eb907b8b4c2a4a5c3e6d4de6ab77027 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* PR c++/29727 */
/* { dg-do compile } */

template<int> struct A
{
  static int a[1];
};
template<int N> int A<N>::a[1] = { X:0 }; /* { dg-error "does not allow GNU designated|was not declared|designated initializer for an array" } */

void foo()
{
  A<0>::a;
}