http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51543
Bug #: 51543 Summary: terrible diagnostic for wrong type when expected class or namespace Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: m...@gcc.gnu.org Noticed here: http://llvm.org/devmtg/2011-11/Gregor_ExtendingClang.pdf Testcase: typedef int N; N::string str; gcc 4.7: namespace.cc:2:11: error: expected initializer before ‘str’ clang 3.0: namespace.cc:2:1: error: expected a class or namespace N::string str; ^ clang 3.1: t.cpp:2:1: error: ‘N’ (aka ‘int’) is not a class or namespace N::string str; ^ t.cpp:1:13: note: declared here typedef int N; ^