Next: Demangler Up: User Problems Top: Top

3.1. gcc 2.5.x broke my code! Changes in function overloading

``I have a program that worked just fine with older g++ versions, but as of version 2.5.x it doesn't work anymore. Help!''

While it's always possible that a new bug has been introduced into the compiler, it's more likely that you have been relying on bugs in older versions of g++. For example, version 2.5.0 was the first version of g++ to correctly implement the ``hiding rule.'' That is, if you have an overloaded function in a base class, and in a derived class you redefine one of the names, the other names are effectively ``hidden''. All the names from the baseclass need to be redefined in the derived class. See section 13.1 of the ARM: ``A function member of a derived class is not in the same scope as a function member of the same name in a base class''.