This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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
State-Changed-Why:
    I think the example you give should indeed give a warning:
    ----------------------
    class A
    {
      public:
        virtual int ThisFunctionShouldNotCauseAHidingWarning(char*);
        virtual int ThisFunctionShouldNotCauseAHidingWarning(char*,int);
    };
    
    class B : public A
    {
      public:
        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?

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7780


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]