overloading resolution bug

Petr Broz pbroz@yahoo.com
Thu Dec 16 05:56:00 GMT 1999

---- G++ version:
gcc version 2.95.2 19990906 (prerelease)

---- input file to reproduce the bug:
bug.cc (attached)

---- OS used:
Linux egon 2.2.14pre12 #1 Sun Dec 12 10:37:33 CET 1999
i686 unknown

---- G++ configuration used:
g++ 2.95.2-0pre2 package from Debian Linux

---- the substance of the bug:
When compiling the attached code the compiler reports:
bug.cc: In method `void a::test()':
bug.cc:25: request for member `doit' is ambiguous in
multiple inheritance lattice
bug.cc:4: candidates are: void buggy<s2>::doit(s2 &)
bug.cc:4:                 void buggy<s1>::doit(s1 &)

This is incorrect because the two ancestors are not
identical and signatures of the two candidates are
different. Therefore there is no multiple inheritance
taking place and no ambiguity whatsoever.

Thank you for taking time to read my report.

Petr Broz
Masarykovo nam. 35
251 01 Ricany u Prahy
Czech Republic
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.cc
Type: text/x-c++
Size: 237 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19991216/58e7526b/attachment.bin>

More information about the Gcc-bugs mailing list