6.10.8 Predefined macro names

Previous Table of Contents

1984 The following macro names151) shall be defined by the implementation:

1985 __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.

1986 If the date of translation is not available, an implementation-defined valid date shall be supplied.

1987 __FILE__ The presumed name of the current source file (a character string literal).152)

1988 __LINE__ The presumed line number (within the current source file) of the current source line (an integer constant).152)

1989 __STDC__ The integer constant 1, intended to indicate a conforming implementation.

1990 __STDC_HOSTED__ The integer constant 1 if the implementation is a hosted implementation or the integer constant 0 if it is not.

1991 __STDC_VERSION__ The integer constant 199901L.153)

1992 __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.

1993 If the time of translation is not available, an implementation-defined valid time shall be supplied.

1994 The following macro names are conditionally defined by the implementation:

1995 __STDC_IEC_559__ The integer constant 1, intended to indicate conformance to the specifications in annex F (IEC 60559 floating-point arithmetic).

1996 151) See “future language directions” (6.11.9).

1997 152) The presumed source file name and line number can be changed by the #line directive.

1998 153) This macro was not specified in ISO/IEC 9899:1990 and was specified as 199409L in ISO/IEC 9899/AMD1:1995.

1999 The intention is that this will remain an integer constant of type long int that is increased with each revision of this International Standard.

2000 __STDC_IEC_559_COMPLEX__ The integer constant 1, intended to indicate adherence to the specifications in informative annex G (IEC 60559 compatible complex arithmetic).

2001 __STDC_ISO_10646__ An integer constant of the form yyyymmL (for example, 199712L) ,.

2002 If this symbol is defined, then every character in the Unicode required set, when stored in an object of type wchar_t, has the same value as the short identifier of that character.

2003 The Unicode required set consists of all the characters that are 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.

2004 The values of the predefined macros (except for __FILE__ and __LINE__) remain constant throughout the translation unit.

2005 None of these macro names, nor the identifier defined, shall be the subject of a #define or a #undef preprocessing directive.

2006 Any other predefined macro names shall begin with a leading underscore followed by an uppercase letter or a second underscore.

2007 The implementation shall not predefine the macro __cplusplus, nor shall it define it in any standard header.

2008 Forward references: the asctime function (7.23.3.1), standard headers (7.1.2).

Next

Created at: 2005-06-29 02:19:05 The text from WG14/N1124 is copyright © ISO