// PR c++/24817 struct exception {}; template void foo() throw(exception); // { dg-error "declaration" } template void foo(); // { dg-error "exception" } struct bar { template friend void foo(); // { dg-error "exception" } };