c++/7780: -Woverloaded-virtual generating false-positives

bangerth@dealii.org bangerth@dealii.org
Thu Nov 21 19:28:00 GMT 2002

Synopsis: -Woverloaded-virtual generating false-positives

State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Thu Nov 21 18:56:25 2002
    I think the example you give should indeed give a warning:
    class A
        virtual int ThisFunctionShouldNotCauseAHidingWarning(char*);
        virtual int ThisFunctionShouldNotCauseAHidingWarning(char*,int);
    class B : public A
        virtual int ThisFunctionShouldNotCauseAHidingWarning(char*,int);
    int main()
      return 0;
    After all the virtual function in the derived class
    hides indeed the one in the base class, independent of
    the fact that there are _two_ functions in the base class
    with the same name.
    What is it in this argumentation that you do not agree with?


More information about the Gcc-bugs mailing list