From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21612 invoked by alias); 15 Mar 2007 22:45:47 -0000 Received: (qmail 21574 invoked by alias); 15 Mar 2007 22:45:31 -0000 Date: Thu, 15 Mar 2007 22:45:00 -0000 Message-ID: <20070315224531.21573.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/30891] poor diagnostic with namespace in the function scope In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "manu at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-03/txt/msg01455.txt.bz2 ------- Comment #2 from manu at gcc dot gnu dot org 2007-03-15 22:45 ------- Subject: Bug 30891 Author: manu Date: Thu Mar 15 22:45:17 2007 New Revision: 122962 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122962 Log: 2007-03-15 Manuel Lopez-Ibanez PR c++/30891 cp/ * parser.c (cp_parser_statement): If 'namespace' is found, this only can be a namespace alias definition, so parse it now. (cp_parser_namespace_alias_definition): if we find an open brace instead of '=', then this is actually a misplaced namespace definition. testsuite/ * g++.dg/parse/namespace-definition.C: New. Added: trunk/gcc/testsuite/g++.dg/parse/namespace-definition.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30891