gcc/testsuite/g++.dg/eh/pr84968.C
raw| 1 | // { dg-do compile { target c++11 } } |
| 2 | |
| 3 | // { dg-options "" } |
| 4 | |
| 5 | union b; |
| 6 | |
| 7 | struct S { |
| 8 | template <typename> |
| 9 | void a() |
| 10 | try { |
| 11 | } catch (int () |
| 12 | noexcept (({ union b a; true; }))) // { dg-error "'b a' has incomplete type" } |
| 13 | { |
| 14 | } |
| 15 | }; |
| 16 | |
| 17 | template void S::a<int>(); // { dg-message "required from here" } |