For an invalid code snippet like int i; namespace N = i;
we issue the error message bug.cc:2: error: expected namespace-name before ';' token bug.cc:2: error: unknown namespace '<declaration error>' with the not very helpful '<declaration error>'. The situation for the code snippet int i; using namespace i; is similar. Here we get the error message: bug.cc:2: error: expected namespace-name before ';' token bug.cc:2: error: '<type error>' is not a namespace With the old parser we got bug.cc:2: error: unknown namespace `i' resp. bug.cc:2: error: namespace `i' undeclared so this qualifies as a diagnostic regression. I'll post a patch soon. -- Summary: [3.4/4.0/4.1 regression] Bad diagnostic for invalid namespace-name Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23586