blob: cbac7e85112d83c8c5145f1dca3134bde4d3adc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// PR c++/61088
// { dg-do compile { target c++11 } }
void f()
{
typedef void (*X) ();
X x[] = { [x](){} }; // { dg-error "incomplete type" }
}
void g()
{
typedef void (X) ();
X x[] = { [x](){} }; // { dg-error "5:declaration of .x. as array of functions" }
// { dg-error "not declared" "" { target *-*-* } .-1 }
}
|