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