From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23001 invoked by alias); 30 Mar 2004 23:53:34 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 22994 invoked by uid 48); 30 Mar 2004 23:53:34 -0000 Date: Tue, 30 Mar 2004 23:53:00 -0000 Message-ID: <20040330235334.22993.qmail@sources.redhat.com> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040330234533.14790.osf@squirrely.net> References: <20040330234533.14790.osf@squirrely.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/14790] C++: ambigous overload compile failure - new case different from 1675 X-Bugzilla-Reason: CC X-SW-Source: 2004-03/txt/msg03461.txt.bz2 List-Id: ------- Additional Comments From bangerth at dealii dot org 2004-03-30 23:53 ------- With this stripped down (equivalent) program ------------------ struct base1 { void foo(base1*); }; struct base2 { void foo(base2*); }; struct derived : public base1, public base2 {}; int main() { derived fd; fd.foo(new base1()); } ------------------- I get errors with both gcc and icc: g/x> c++ -c x.cc x.cc: In function `int main()': x.cc:8: error: request for member `foo' is ambiguous x.cc:2: error: candidates are: void base2::foo(base2*) x.cc:1: error: void base1::foo(base1*) g/x> icc -c -Xc -ansi x.cc x.cc(8): error: "derived::foo" is ambiguous fd.foo(new base1()); ^ compilation aborted for x.cc (code 2) I am pretty sure the code is invalid, but someone may be able to cite the relevant paragraphs. W. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14790