From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30336 invoked by alias); 26 Aug 2005 22:17:58 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 30309 invoked by uid 48); 26 Aug 2005 22:17:52 -0000 Date: Fri, 26 Aug 2005 22:20:00 -0000 From: "reichelt at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050826221750.23586.reichelt@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/23586] New: [3.4/4.0/4.1 regression] Bad diagnostic for invalid namespace-name X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg03096.txt.bz2 List-Id: 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 '' with the not very helpful ''. 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: '' 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