g++ bug: version 2.95.2 (and earlier)
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Thu Apr 13 13:17:00 GMT 2000
> However, renaming Foo::DoFoo(int) and Bar::DoFoo(int) to something which
> is different from the non-virtual function in the base class works. So,
> renaming the virtual functions in both base and derived classes to DoFoo1()
> works. (Also, commenting out either line 8 or line 15 compiles ok.)
Thanks for your bug report. This is a bug in your code, not in
g++. Methods of derived classes hide methods of base classes; please
ask in one of the public C++ fora for a more elaborate explanation,
eg. comp.lang.c++.moderated, or comp.std.c++.
Regards,
Martin
More information about the Gcc-bugs
mailing list