Macros to identify the XL C/C++ compiler
Most of the macros related to the XL C/C++ compiler are predefined and protected, which means that the compiler will issue a warning if you try to undefine or redefine them. You can use the -dM (-qshowmacros) -E compiler options to view the values of the predefined macros.
| Predefined macro name | Description | Predefined value |
|---|---|---|
__IBMC__1 |
Indicates the level of the XL C compiler. | An integer in format VRM, where:
|
__IBMCPP__1 |
Indicates the level of the XL C++ compiler. | An integer in format VRM, where:
|
| __xlC__1 | Indicates the VR level of the XL C and XL C++ compilers in hexadecimal format. The XL C compiler predefines this macro. | A 4-digit hexadecimal integer in format 0xVVRR,
where:
|
| __xlC_ver__1 | Indicates the MF level of the XL C and XL C++ compilers in hexadecimal format. The XL C compiler predefines this macro. | An 8-digit hexadecimal integer in format 0x0000MMFF,
where:
|
__xlc__1 |
Indicates the level of the XL C compiler. | A string in format V.R.M.F,
where:
|
| __clang__ | Indicates that Clang front end is used. | 1 |
| __clang_major__ | Indicates the major version number of the Clang front end. | 4 |
| __clang_minor__ | Indicates the minor version number of the Clang front end. | 0 |
| __clang_patchlevel__ | Indicates the patch level number of the Clang front end. | 1 |
| __clang_version__ | Indicates the full version of the Clang front end. | 4.0.1 (tags/RELEASE_401/final) |
| __ibmxl__ | Indicates the XL C/C++ compiler is being used. | 1 |
| __ibmxl_vrm__ | Indicates the VRM level of the XL C/C++ compiler using a single integer for sorting purposes. | A hexadecimal integer whose value is as follows:
|
| __ibmxl_version__ | Indicates the version number of the XL C/C++ compiler. | An integer that represents the version number |
| __ibmxl_release__ | Indicates the release number of the XL C/C++ compiler. | An integer that represents the release number |
| __ibmxl_modification__ | Indicates the modification number of the XL C/C++ compiler. | An integer that represents the modification number |
| __ibmxl_ptf_fix_level__ | Indicates the PTF fix level of the XL C/C++ compiler. | An integer that represents the fix number |
| __llvm__ | Indicates that an LLVM backend is used. | 1 |
Note:
|
||
__IBMC__
__IBMCPP__

