http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56936
Bug #: 56936 Summary: gcc don't show error when accessing to current instantiation Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: vanya...@gmail.com I believe this code is incorrect: template <typename T> struct x { typedef typename x<T>::asdf mytype; }; As x<T> refers to current instantiation and asdf is not a member of current instantiation. clang shows a error on this code: 12.cpp:4:28: error: no type named 'asdf' in 'x<T>' typedef typename x<T>::asdf mytype; ~~~~~~~~~~~~~~~^~~~ 1 error generated.