From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23576 invoked by alias); 3 Nov 2005 15:59:53 -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 23555 invoked by uid 48); 3 Nov 2005 15:59:49 -0000 Date: Thu, 03 Nov 2005 15:59:00 -0000 Subject: [Bug c++/24658] New: overloaded function lookup in base class fails X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "thorsten dot gecks at uni-bayreuth dot de" X-SW-Source: 2005-11/txt/msg00473.txt.bz2 List-Id: Compiler version details: ************************* gcc -v Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.4/specs Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --disable-checking --libdir=/usr/lib --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux Thread model: posix gcc version 3.3.4 (pre 3.3.5 20040809) Sample code producing the error: ******************************** class A{}; class B{}; class C { public: int f(A){return 4;} }; class D : public C { public: int f(B){return 4;} }; int main(int, char **) { D d; A a; int res = d.f(a); return res; } Compiler error message: *********************** test.cpp: In function `int main(int, char**)': test.cpp:26: error: no matching function for call to `D::f(A&)' test.cpp:16: error: candidates are: int D::f(B) -- Summary: overloaded function lookup in base class fails Product: gcc Version: 3.3.4 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: thorsten dot gecks at uni-bayreuth dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24658