Predefined Macros
The compiler preprocessor has predefined macros (some refer to these as predefined
symbols). The compiler simulates variable definitions that describe the compile-time
environment and properties of the target processor.
This chapter lists the predefined macros that all CodeWarrior compilers make available.
• __COUNTER__
• __cplusplus
• __CWCC__
• __embedded_cplusplus
• __FILE__
• __func__
• __FUNCTION__
• __ide_target()
• __LINE__
• __MWERKS__
• __PRETTY_FUNCTION__
• __profile__
• __STDC__
• __TIME__
__COUNTER__
Preprocessor macro that expands to an integer.
Syntax
__COUNTER__
Remarks
The compiler defines this macro as an integer that has an initial value of 0
incrementing by 1 every time the macro is used in the translation unit.
The value of this macro is stored in a precompiled header and is restored when the
precompiled header is used by a translation unit.