Function overloading bug ?
David Binderman
davidb@msi-uk.com
Thu Dec 4 05:27:00 GMT 1997
Hello there,
Given the following code on a DEC Alpha, compiled by any version of
egcs, but especially egcs-971201,
class A
{
public:
void f1( unsigned long );
void f2( unsigned long, void* callback, int );
};
void f3()
{
}
void A :: f1( unsigned long )
{
f2( (unsigned long) 27, ::f3, 31);
}
then I get
hw83.cc: In method `void A::f1(long unsigned int)':
hw83.cc:15: Error: no matching function for call to `A::f2 (long unsigned int, void ()(), int)'
hw83.cc:6: Error: candidates are: A::f2(long unsigned int, void *, int)
davidb@decalpha:208:
Three other compilers are happy with the code, so I'm pretty sure the
code is ok.
Regards
David C Binderman MSc BSc (Hons) +44 171 971 8765
contracting at Mobile Systems International in the Docklands, London, England
"There is no substitute for skill, taste & experience when programming"
Dr Stroustrup, inventor of C++.
More information about the Gcc-bugs
mailing list