view gcc/testsuite/g++.dg/init/error2.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 84e7813d76e9
children
line wrap: on
line source

/* 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;
}