__PRETTY_FUNCTION__. NXP CodeWarrior Development Studio
Advertentie
Advertentie
Chapter 25 Predefined Macros
Using these macros, user can conditionally compile code for a particular optimization level. The following table lists the level of optimization provided by the
__optlevelx macro.
Table 25-1. Optimization Levels
Macro Optimization Level
__optlevel0
__optlevel1
__optlevel2
__optlevel3
__optlevel4
O0
O1
O2
O3
O4
Example
The listing below shows an example of
__optlevelx
macro usage.
Listing 25-1. Example usage of
__optlevel
macro
int main()
{
#if __optlevel0
... // This code compiles only if this code compiled with Optimization level 0
#elif __optlevel1
... // This code compiles only if this code compiled with Optimization level 1
#elif __optlevel2
... // This code compiles only if this code compiled with Optimization level 2
#elif __optlevel3
... // This code compiles only if this code compiled with Optimization level 3
#elif __optlevel4
... // This code compiles only if this code compiled with Optimization level 4
#endif
}
25.19 __PRETTY_FUNCTION__
Predefined variable containing a character string of the "unmangled" name of the C++ function being compiled.
Syntax
Prototype
static const char __PRETTY_FUNCTION__[] = "
function-name ";
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.6, 02/2014
Freescale Semiconductor, Inc.
415
Downloaden
Advertentie