warn_no_explicit_virtual. NXP CodeWarrior Development Studio
Mainos
Mainos
Chapter 29 Pragmas for C++
29.44 warn_no_explicit_virtual
Controls the issuing of warning messages if an overriding function is not declared with a virtual keyword.
Syntax
#pragma warn_no_explicit_virtual on | off | reset
Remarks
Listing 29-15 on page 455 shows an example.
Listing 29-15. Example of warn_no_explicit_virtual pragma
#pragma warn_no_explicit_virtual on struct A {
virtual void f();
}; struct B {
void f();
// WARNING: override B::f() is declared without virtual keyword
}
Tip
This warning message is not required by the ISO/IEC
14882:2003 C++ standard, but can help you track down unwanted overrides.
This pragma does not correspond to any panel setting. By default, this pragma is off
.
29.45 warn_no_typename
Controls the issuing of warning messages for missing typenames
.
Syntax
#pragma warn_no_typename on | off | reset
Remarks
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.6, 02/2014
Freescale Semiconductor, Inc.
455
Lataa
Mainos