-Woverloaded-virtual - warnings
http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
The warning means that: When you are not using dynamic dispatch then your derived class object can only call,
void exception()
and it will hide all same named methods of the Base class intermediate.
In order that your derived class object can call all the same named methods in base class intermediate, You need to add the following line to your derived class.
using intermediate::exception; Ofcourse, You are in best position to decide if this is a problem or not.
Comments (10)
-
-
-
assigned issue to
- changed title to -Woverloaded-virtual - warnings
- edited description
-
assigned issue to
-
- marked as minor
-
- marked as major
slows down the eclipse build process and debugging the own code becomes annoying after a while...
-
reporter - marked as enhancement
Warnings are not bugs by definition.
-
reporter Warnings are not bugs by definition.
-
reporter Workaround : Remove -Wall from the compiler options on macs. (This is not part of wall on Linux).
-
reporter This is a fairly involved issue. Primarily affects classes where the subclass actually extends the superclass, and the superclass' functions just "don't" work for the subclass.
Ie. The subclass functions must be overloaded.
There are two possible fixes:
- Make sure the overloadable functions are not virtual (probably the way to go)
- Make the overloadable functions private/protected in the subclasses
Need some more investigation to see which method will work best.
-
reporter - edited description
- marked as minor
This needs some attention.
-
reporter - changed status to resolved
It's a stale bug and we're not looking to support macs for now.
- Log in to comment
These are all the 6 warnings realted to this issue
Description Resource Path Location Type 'scl::SGcController::init' hides overloaded virtual function [-Woverloaded-virtual] SGcController.hpp /scl-manips-group.git/src/scl/control/gc/data_structs line 78 C/C++ Problem 'sutil::CMappedMultiLevelList<std::basic_string<char>, scl::STaskBase *>::create' hides overloaded virtual functions [-Woverloaded-virtual] CMappedMultiLevelList.hpp /scl-manips-group.git/3rdparty/sUtil/src/sutil line 60 C/C++ Problem 'sutil::CMappedMultiLevelList<std::basic_string<char>, scl::STaskBase *>::create' hides overloaded virtual functions [-Woverloaded-virtual] CMappedMultiLevelList.hpp /scl-manips-group.git/3rdparty/sUtil/src/sutil line 65 C/C++ Problem 'sutil::CMappedMultiLevelList<std::basic_string<char>, scl::STaskBase *>::deepCopy' hides overloaded virtual function [-Woverloaded-virtual] CMappedMultiLevelList.hpp /scl-manips-group.git/3rdparty/sUtil/src/sutil line 70 C/C++ Problem 'sutil::CMappedTree<std::basic_string<char>, scl::SGraphicsPhysicalLink>::deepCopy' hides overloaded virtual function [-Woverloaded-virtual] CMappedTree.hpp /scl-manips-group.git/3rdparty/sUtil/src/sutil line 82 C/C++ Problem 'sutil::CMappedTree<std::basic_string<char>, scl::SRobotLink>::deepCopy' hides overloaded virtual function [-Woverloaded-virtual] CMappedTree.hpp /scl-manips-group.git/3rdparty/sUtil/src/sutil line 82 C/C++ Problem