This is the mail archive of the gcc-help@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]

C++ Warning for Base Class Overrides?


Hi All,

I'm compiling with -Wall -Wextra on GCC. When I passed the dame code
through ICC, a few functions were flagged as unintentional overrides.
For example:

class Base
{
    void Foo(int);
}

class Derived
{
    void Foo(float);
}

What switch do I need for GCC to warn of the same? The switch I see
(-Woverride-init) does not appear to be what I need.

Jeff


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