Specifications

CAVR-4
230
Predefined symbols
AVR® IAR C/C++ Compiler
Reference Guide
__DATE__
Use this symbol to identify when the file was compiled. This symbol expands to the date
of compilation, which is returned in the form
"Mmm dd yyyy", for example "Jan 30
2002".
__derivative__
Use this symbol to identify the used processor variant.
Corresponds to the processor variant that you have specified with the
--cpu compiler
option. derivative corresponds exactly to the derivative name in Table 2, Mapping of
processor options on page 6, except for FpSLic, which uses the predefined symbol
__AT94Kxx__.
For example, the symbol is
__AT90S2313__ when the --cpu=2313 option is used, and
__ATmega163__ when --cpu=m163 is used.
__embedded_cplusplus
This predefined symbol expands to the number 1 when the compiler runs in any of the
C++ modes. When the compiler runs in ISO/ANSI C mode, the symbol is undefined.
__FILE__
Use this symbol to identify which file is currently being compiled. This symbol expands
to the name of that file.
See also, __BASE_FILE__, page 229.
__func__, __FUNCTION__
Use one of these symbols inside a function body to make it expand into a string with the
function name as context. This is useful for assertions and other trace utilities. These
symbols require that language extensions are enabled, see -e, page 179.
See also, __PRETTY_FUNCTION__, page 233.
__HAS_EEPROM__
This symbol determines whether there is internal EEPROM available or not.
When this symbol is defined, there is internal EEPROM available. When this symbol is
not defined, there is no internal EEPROM available.
__HAS_EIND__
This symbol determines whether the instruction EIND is available or not.
When this symbol is defined, the instruction
EIND is available. When this symbol is not
defined, the
EIND instruction is not available.