gcc/testsuite/g++.dg/eh/spec8.C
raw| 1 | // PR c++/24817 |
| 2 | // { dg-do compile { target c++14_down } } |
| 3 | |
| 4 | struct exception {}; |
| 5 | |
| 6 | template <typename T> void foo() throw(exception); // { dg-message "declaration" } |
| 7 | // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } .-1 } |
| 8 | template <typename T> void foo(); // { dg-error "exception" } |
| 9 | |
| 10 | struct bar |
| 11 | { |
| 12 | template <typename T> friend void foo(); // { dg-error "exception" } |
| 13 | }; |