Macros related to language levels
The following macros except __cplusplus, __STDC__, and __STDC_VERSION__ are predefined to a value of 1 by a specific language level, represented by a suboption of the -std (-qlanglvl) compiler option, or any invocation or pragma that implies that suboption. If the suboption enabling the feature is not in effect, then the macro is undefined. For descriptions of the features related to these macros, see the XL C/C++ Language Reference and the C and C++ language standards.
Predefined macro name | Description | Predefined when the following language level is in effect |
---|---|---|
__BOOL__ | Indicates that the bool keyword is accepted. | Always defined. |
__cplusplus | The numeric value that indicates the supported language standard as defined by that specific standard. | The format is yyyymmL. (For example, the format is 199901L for C99.) |
__IBMCPP_COMPLEX_INIT | Indicates support for the initialization of complex types: float _Complex, double _Complex, and long double _Complex. | extended | extended0x |
__STDC__ | Indicates that the compiler conforms to the ANSI/ISO C standard. | Predefined to 1 if ANSI/ISO C standard conformance is in effect. Explicitly defined to 0. |
__STDC_HOSTED__ | Indicates that the implementation is a hosted implementation of the ANSI/ISO C standard. (That is, the hosted environment has all the facilities of the standard C available). | stdc11 | extc1x | stdc99 | extc99 extended0x| extended1y |
__STDC_NO_ATOMICS__ | Indicates that the implementation does not have the full support of the atomics feature. | stdc11 | extc1x |
__STDC_NO_THREADS__ | Indicates that the implementation does not have the full support of the threads feature. | stdc11 | extc1x |
__STDC_VERSION__ | Indicates the version of ANSI/ISO C standard which the compiler conforms to. | The format is yyyymmL. (For example, the format is 199901L for C99.) |