gcc/testsuite/g++.dg/cpp0x/catch1.C
raw| 1 | // PR c++/53371 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'. |
| 4 | |
| 5 | struct Abs |
| 6 | { |
| 7 | virtual void a() = 0; |
| 8 | }; |
| 9 | |
| 10 | void foo() |
| 11 | { |
| 12 | try { |
| 13 | } catch (Abs) { } // { dg-error "abstract class type" } |
| 14 | |
| 15 | try { |
| 16 | } catch (int&&) { } // { dg-error "rvalue reference type" } |
| 17 | } |