From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6709 invoked by alias); 6 Sep 2002 22:02:14 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 6699 invoked from network); 6 Sep 2002 22:02:13 -0000 Received: from unknown (HELO mail-out1.apple.com) (17.254.0.52) by sources.redhat.com with SMTP; 6 Sep 2002 22:02:13 -0000 Received: from mailgate1.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out1.apple.com (8.11.3/8.11.3) with ESMTP id g86M2Dm23581 for ; Fri, 6 Sep 2002 15:02:13 -0700 (PDT) Received: from scv1.apple.com (scv1.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id ; Fri, 6 Sep 2002 15:02:10 -0700 Received: from Matt-Austerns-Computer.local. (vpn-scv-x1-37.apple.com [17.219.193.37]) by scv1.apple.com (8.11.3/8.11.3) with ESMTP id g86M28b10415; Fri, 6 Sep 2002 15:02:08 -0700 (PDT) Date: Fri, 06 Sep 2002 15:02:00 -0000 Subject: Re: Ambiguous base class Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v543) Cc: gcc@gcc.gnu.org To: Wolfgang Bangerth From: Matt Austern In-Reply-To: Message-Id: <6B98C701-C1E4-11D6-A346-000393B2ABA2@apple.com> Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00250.txt.bz2 On Friday, September 6, 2002, at 01:25 PM, Wolfgang Bangerth wrote: > > Matt Austern writes: >> (2) If the answer to #1 is 'no': is this a known bug? > > Yes, its c++/525. Hm, that seems slightly different. I'm puzzled because the compiler is treating D1::Base::x differently from D1::x (where Base is an unambiguous base class of D1). It doesn't involve the -pedantic flag. I see it in the TOT compiler. 525 is different in that: (a) it has nothing to do with the multiple qualification syntax; (b) it only manifests itself with the -pedantic flag; (c) it's marked as having been fixed in 3.1. It does look like 525 may be related to what I'm seeing, but I don't think it's a duplicate. Again, here is my example: struct A { int x; }; struct B1 : public A { }; struct B2 : public A { }; struct D : public B1, public B2 { }; int f(D d) { return d.B1::A::x; } Note that the compiler accepts it if you change B1::A::x to B1::x. Unless I've missed something, this ought not to make a difference. --Matt