-
Notifications
You must be signed in to change notification settings - Fork 3
Description
6.10.8 — Predefined macro names
- (1) The following macro names148) shall be defined by the implementation:
_ _DATE_ _ The date of translation of the preprocessing translation unit: a character string literal of the form "Mmm dd yyyy", where the names of the months are the same as those generated by the asctime function, and the first character of dd is a space character if the value is less than 10. If the date of translation is not available, an implementation-defined valid date shall be supplied.
_ _FILE_ _ The presumed name of the current source file (a character string literal).149)
_ _LINE_ _ The presumed line number (within the current source file) of the current source line (an integer constant).149)
_ _STDC_ _ The integer constant 1, intended to indicate a conforming implementation.
_ _STDC_HOSTED_ _ The integer constant 1 if the implementation is a hosted implementation or the integer constant 0 if it is not.
_ _STDC_VERSION_ _ The integer constant 199901L.150)
_ _TIME_ _ The time of translation of the preprocessing translation unit: a character string literal of the form "hh:mm:ss" as in the time generated by the asctime function. If the time of translation is not available, an implementation-defined valid time shall be supplied. - (2) The following macro names are conditionally defined by the implementation:
_ _STDC_IEC_559_ _ The integer constant 1, intended to indicate conformance to the specifications in annex F (IEC 60559 floating-point arithmetic). - (3) The values of the predefined macros (except for _ _FILE_ _ and _ _LINE_ _) remain constant throughout the translation unit.
- (4) None of these macro names, nor the identifier defined, shall be the subject of a #define or a #undef preprocessing directive. Any other predefined macro names shall begin with a leading underscore followed by an uppercase letter or a second underscore.
- (5) The implementation shall not predefine the macro _ _cplusplus, nor shall it define it in any standard header.
148) See ‘‘future language directions’’ (6.11.9).
149) The presumed source file name and line number can be changed by the #line directive.
150) This macro was not specified in ISO/IEC 9899:1990 and was specified as 199409L in ISO/IEC 9899/AMD1:1995. The intention is that this will remain an integer constant of type long int that is increased with each revision of this International Standard.
_ _STDC_IEC_559_COMPLEX_ _ The integer constant 1, intended to indicate adherence to the specifications in informative annex G (IEC 60559 compatible complex arithmetic).
_ _STDC_ISO_10646_ _ An integer constant of the form yyyymmL (for example, 199712L), intended to indicate that values of type wchar_t are the coded representations of the characters defined by ISO/IEC 10646, along with all amendments and technical corrigenda as of the specified year and month.