//PR c++/28303 template struct A { typedef struct typename T::X X; // { dg-error "expected identifier|two or more" } }; template A::X::X() {} // { dg-error "not a type|forbids declaration|invalid use of" }