From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20403 invoked by alias); 2 May 2003 10:29: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 20382 invoked by uid 48); 2 May 2003 10:29:01 -0000 Date: Fri, 02 May 2003 10:29:00 -0000 Message-ID: <20030502102901.20381.qmail@sources.redhat.com> To: ctron@dentrassi.de, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org From: giovannibajo@libero.it Reply-To: giovannibajo@libero.it, ctron@dentrassi.de, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/10600: method lookup does not work correctly in dervied classes with virtual methods X-SW-Source: 2003-05/txt/msg00116.txt.bz2 List-Id: Synopsis: method lookup does not work correctly in dervied classes with virtual methods State-Changed-From-To: open->closed State-Changed-By: bajo State-Changed-When: Fri May 2 10:29:01 2003 State-Changed-Why: Not a bug, this is how C++ works: a function in a derived class completely shadows function(s) in a base class with the same name. Here C::test(int) is shadowing B::test(), hence the compilation error. Another workaround would be to put "using B::test;" inside the definition of class C. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10600