From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1033 invoked by alias); 13 Aug 2002 14:06:02 -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 1015 invoked by uid 71); 13 Aug 2002 14:06:01 -0000 Resent-Date: 13 Aug 2002 14:06:01 -0000 Resent-Message-ID: <20020813140601.1014.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, timb@bluearc.com Received: (qmail 28609 invoked by uid 61); 13 Aug 2002 13:58:47 -0000 Message-Id: <20020813135847.28608.qmail@sources.redhat.com> Date: Tue, 13 Aug 2002 07:46:00 -0000 From: timb@bluearc.com Reply-To: timb@bluearc.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7584: Erroneous ambiguous base error on using declaration X-SW-Source: 2002-08/txt/msg00261.txt.bz2 List-Id: >Number: 7584 >Category: c++ >Synopsis: Erroneous ambiguous base error on using declaration >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Tue Aug 13 07:06:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: timb@bluearc.com >Release: 3.1.1 (powerpc-eabi) >Organization: >Environment: Debian GNU/Linux x86 unstable >Description: When compiling the code below, gcc reports "`A' is an ambiguous base of `C'" for each using declaration, and goes on to complain of "C::T x;" that "`typedef int A::T' is inaccessible". (Incidentally, the ambiguous base messages give the line number of the opening brace of the class definition.) There is no ambiguity for either using declaration, since A is a virtual base class. In the second, there would be no ambiguity even if A were a non-virtual base, since nested types can always be referred to unambiguously (para. 10.2/5). >How-To-Repeat: Compile the following with gcc -c class A { public: typedef int T; int a; }; class B : virtual private A { }; class C : virtual private A, public B { public: using A::a; using A::T; }; C::T x; >Fix: >Release-Note: >Audit-Trail: >Unformatted: