// PR c++/22318. Improve diagnostic for local template declaration. // { dg-do compile } void f(void) { template class A /* { dg-error "a template declaration cannot appear at block scope" } */ { }; } void g(void) { template f(); /* { dg-error "expected primary-expression" "primary-expression" } */ }