Compiler Predefined Macros

The ANSI standard for the C language requires the Compiler to predefine a couple of macros. The Compiler provides the predefined macros listed in the following table.

Table 1. Macros defined by the Compiler
Macro Description
__LINE__ Line number in the current source file
__FILE__ Name of the source file where it appears
__DATE__ The date of compilation as a string
__TIME__ The time of compilation as a string
__STDC__ Set to 1 if the -Ansi: Strict ANSI compiler option has been given. Otherwise, additional keywords are accepted (not in the ANSI standard).

The following tables lists all Compiler defines with their associated names and options.

It is also possible to log all Compiler predefined defines to a file using the -Ldf: Log Predefined Defines to File compiler option.