This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7780: -Woverloaded-virtual generating false-positives
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, linux_dr at yahoo dot com, nobody at gcc dot gnu dot org
- Date: 22 Nov 2002 02:56:26 -0000
- Subject: Re: c++/7780: -Woverloaded-virtual generating false-positives
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, linux_dr at yahoo dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
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