HP C A.06.05 Reference Manual

Preprocessing Directives
Predefined Macros
Chapter 7194
Predefined Macros
In addition to __LINE__ and __FILE__ (see “Line Control (#line)” on page 198), ANSI C
provides the __DATE__, __TIME__ and __STDC__ predefined macros. Table 7-1 describes the
complete set of macros that are predefined to produce special information. They may not be
undefined.
NOTE __DATE__, __TIME__, and __STDC__ are only defined in ANSI mode.
Table 7-1 Predefined Macros
Macro
Name Description
__DATE__ Produces the date of compilation in the form Mmm dd
yyyy.
__FILE__ Produces the name of the file being compiled.
__LINE__ Produces the current source line number.
__STDC__ Produces the decimal constant 1, indicating that the
implementation is standard-conforming.
__TIME__ Produces the time of compilation in the form hh:mm:ss.