// Test for helpful error message about missing typename. template struct A { typedef T foo; typedef T bar; }; template void f(T t) { typedef A::foo type; // { dg-error "typename" } A::bar b; // { dg-error "typename" } } // { dg-error "expected ';'" "" { target *-*-* } 8 } template struct B { void f() { A::baz z; // { dg-error "typename" } } // { dg-error "expected ';'" "" { target *-*-* } 15 } };