diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice13.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice13.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice13.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice13.C new file mode 100644 index 0000000000..4c611ad8ee --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice13.C @@ -0,0 +1,14 @@ +// 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 "array of functions|not declared" } +} |