gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C
raw| 1 | // PR c++/47263 |
| 2 | // PR c++/49260 |
| 3 | // { dg-options "-fno-asynchronous-unwind-tables -fno-dwarf2-cfi-asm" } |
| 4 | // { dg-do run { target { c++11 && { ! c++17 } } } } |
| 5 | |
| 6 | #include <exception> |
| 7 | |
| 8 | int main( void ) |
| 9 | { |
| 10 | std::set_unexpected( []{ throw 0; } ); // { dg-warning "deprecated" } |
| 11 | try |
| 12 | { |
| 13 | []() throw( int ) { throw nullptr; }(); // { dg-warning "deprecated" } |
| 14 | } |
| 15 | catch( int ) |
| 16 | { } |
| 17 | } |