Hi,

I was wondering whether it is possible to have GCC produce a warning
whenever a non-virtual method in the base class is hidden by a method in the
derived class. I know this is possible for virtual methods by using
the -Woverload-virtual switch, but I haven't been able to find the
equivalent for non-virtual methods.

For example, I would like GCC to produce a warning about the following code.

class A
{
public:
  void f() {}
};

class B : public A
{
public:
  void f(int) {}
};

Something like:
warning: void A::f() was hidden by void B::f(int)

Anyone?

Kind regards,

Marcel Loose.


_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to