This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
2.95.1 -Woverloaded-virtual unneeded warning
- To: gcc-bugs at gcc dot gnu dot org
- Subject: 2.95.1 -Woverloaded-virtual unneeded warning
- From: JDonner <jdonner0 at earthlink dot net>
- Date: Sun, 26 Sep 1999 17:57:30 -0400
This produces the needless warnings below:
struct a
{
virtual int foo(const char*) const;
virtual int foo(int) const;
};
struct b : public a
{
virtual int foo(const char*) const;
};
int main()
{
return 0;
};
gcc -Wall -Woverloaded-virtual foo.cpp
foo.cpp:4: warning: `a::foo(int) const' was hidden
foo.cpp:9: warning: by `b::foo(const char *) const'
gcc -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.1/specs
gcc version 2.95.1 19990816 (release)
Pardon me if this is already fixed or known.
Thanks,
Jeff