C in a Nutshell (In a Nutshell (OReilly))
14.8. Predefined Macros
Every compiler that conforms to the ISO C standard must define the following seven macros. Each of these macro names begins and ends with two underscore characters:
The values of the _ _FILE_ _ and _ _LINE_ _ macros can be influenced by the #line directive. The values of all the other predefined macros remains constant throughout the compilation process. The value of the constant _ _STDC_VERSION_ _ will be adjusted with each future revision of the international C standard. Under the C99 standard, C programs are executed either in a hosted or in a freestanding environment. Most C programs are executed in a hosted environment, which means that the C program runs under the control and with the support of an operating system. In this case, the constant _ _STDC_HOSTED_ _ has the value 1, and the full standard library is available. A program in a freestanding environment runs without the support of an operating system, and therefore only minimal standard library resources are available to it (see "Execution Environments" in Chapter 15). Unlike the macros listed previously, the following standard macros are optional. If any of these macros is defined, it indicates that the implementation supports a certain IEC or ISO standard:
You must not use any of the predefined macro names described in this section in a #define or #undef directive. Finally, the macro name _ _cplusplus is reserved for C++ compilers, and must not be defined when you compile a C source file. |