struct B { template struct C; }; template struct A { typedef typename T::C V; }; // { dg-error "" } void f () { A::V p; } // { dg-error "" }