public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: timb@bluearc.com To: gcc-gnats@gcc.gnu.org Subject: c++/7584: Erroneous ambiguous base error on using declaration Date: Tue, 13 Aug 2002 07:46:00 -0000 [thread overview] Message-ID: <20020813135847.28608.qmail@sources.redhat.com> (raw) >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:
next reply other threads:[~2002-08-13 14:06 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-08-13 7:46 timb [this message] 2002-09-13 16:03 nathan 2002-10-17 13:40 mmitchel 2002-10-17 15:38 mmitchel
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020813135847.28608.qmail@sources.redhat.com \ --to=timb@bluearc.com \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).