From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1318 invoked by alias); 20 Dec 2002 12:56:05 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 1298 invoked by uid 71); 20 Dec 2002 12:56:04 -0000 Resent-Date: 20 Dec 2002 12:56:04 -0000 Resent-Message-ID: <20021220125604.1297.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, fonseca@mip.sdu.dk Received: (qmail 31981 invoked by uid 61); 20 Dec 2002 12:55:15 -0000 Message-Id: <20021220125515.31975.qmail@sources.redhat.com> Date: Fri, 20 Dec 2002 04:56:00 -0000 From: fonseca@mip.sdu.dk Reply-To: fonseca@mip.sdu.dk To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9022: using declaration accepted as using directive X-SW-Source: 2002-12/txt/msg01088.txt.bz2 List-Id: >Number: 9022 >Category: c++ >Synopsis: using declaration accepted as using directive >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Fri Dec 20 04:56:02 PST 2002 >Closed-Date: >Last-Modified: >Originator: fonseca@mip.sdu.dk >Release: confirmed with gcc-3.2 and gcc-2.95-3 >Organization: >Environment: confirmed under solaris-2.8, gnu/linux, and cygwin >Description: GCC currently accepts an invalid using declaration. The first line marked with "// error" must not be accepted because "org::gnu::gcc" is a namespace. Warning: This information is based on my interpretation of http://anubis.dkuug.dk/jtc1/sc22/open/n2356 > >> namespace org { namespace gnu { namespace gcc { } } } using org::gnu::gcc; // error - using declaration using namespace org::gnu::gcc; // ok - using directive class MyClass { private: // the using declaration below is rejected as it should be // but for the wrong reason. the standard requires ANY // using declaration to be accepted as a member // declaration. // using org::gnu::gcc; // error - using declaration }; int main() { return 0; } <<< >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: