warn_hidevirtual

Controls the recognition of a non-virtual member function that hides a virtual function in a superclass.

Syntax
#pragma warn_hidevirtual on | off | reset
  
Remarks

If you enable this pragma, the compiler issues a warning message if you declare a non-virtual member function that hides a virtual function in a superclass. One function hides another if it has the same name but a different argument type. Hidden Virtual Functions shows an example.

Listing 1. Hidden Virtual Functions
class A {
  public:
    virtual void f(int);
    virtual void g(int);
};

class B: public A {
  public:
    void f(char);        // WARNING: Hides A::f(int)
    virtual void g(int); // OK: Overrides A::g(int)
};   

The ISO/IEC 14882:2003 C++ Standard does not require this pragma.

Note: A warning message normally indicates that the pragma name is not recognized, but an error indicates either a syntax problem or that the pragma is not valid in the given context.

This pragma corresponds to the Hidden Virtual Functions setting in the CodeWarrior IDE's Properties > C/C++ Build > Settings > Tool Settings > PowerPC Compiler > Warniings C/C++ Language settings panel.

Related information
access_errors
always_inline
arg_dep_lookup
ARM_conform
ARM_scoping
array_new_delete
auto_inline
bool
cplusplus
cpp1x
cpp_extensions
debuginline
def_inherited
defer_codegen
defer_defarg_parsing
direct_destruction
direct_to_som
dont_inline
ecplusplus
exceptions
inline_bottom_up
inline_bottom_up_once
inline_depth
inline_max_auto_size
inline_max_size
inline_max_total_size
internal
iso_templates
new_mangler
no_conststringconv
no_static_dtors
nosyminline
old_friend_lookup
old_pods
old_vtable
opt_classresults
parse_func_templ
parse_mfunc_templ
RTTI
suppress_init_code
template_depth
thread_safe_init
warn_no_explicit_virtual
warn_no_typename
warn_notinlined
warn_structclass
wchar_type