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]

2.95.1 -Woverloaded-virtual unneeded warning


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


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