struct A { static const bool b=false; }; struct B { typedef A X; }; template struct C {}; template struct D { C c; // { dg-error "parsed as a non-type|if a type is meant" } }; D d; // { dg-message "required from here" }