https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62315
Bug ID: 62315 Summary: do not print typename in diagnostic if the original code does not have it Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: manu at gcc dot gnu.org /home/manuel/test2/src/gcc/testsuite/g++.dg/parse/typedef2.C:2:42: error: need ‘typename’ before ‘typename B<T>::X::Y’ because ‘typename B<T>::X’ is a dependent scope template <typename T> struct A { typedef B<T>::X::Y Z; }; // { dg-error "" } ^ It is confusing to say that typename is needed before 'typename B<T>::X::Y'.