This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
C++ Warning for Base Class Overrides?
- From: Jeffrey Walton <noloader at gmail dot com>
- To: GCC Users List <gcc-help at gcc dot gnu dot org>
- Date: Tue, 9 Aug 2011 07:38:17 -0400
- Subject: C++ Warning for Base Class Overrides?
- Reply-to: noloader at gmail dot com
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