This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
GCC3.4.2 selects incorrect function overload when an ellipsis overload is available
- From: "Lee-Thorp, Andrew" <ALee-Thorp at ndsuk dot com>
- To: <gcc-bugs at gcc dot gnu dot org>
- Date: Wed, 3 Nov 2004 13:33:31 -0000
- Subject: GCC3.4.2 selects incorrect function overload when an ellipsis overload is available
GCC 3.4.2 selects an 'unavailable' function overload.
Platform is Cygwin on Windows 2000.
See the example below.
class A {};
class B : public A {};
class C : private A {};
void f(...);
void f(A*);
void error()
{
f(static_cast<B*>(0));
f(static_cast<C*>(0)); // <- Line 42
}
Conversion.cc: In function `void error()':
Conversion.cc:42: error: `A' is an inaccessible base of `C'
=======================================================
Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by email to postmaster@ndsuk.com and destroy the original message.