Macros indicating the XL C compiler

Macros related to the XL C compiler are always predefined, and they are protected, which means that the compiler will issue a warning if you try to undefine or redefine them. You can use the -qshowmacros=pre -E compiler options to view the values of the predefined macros.

Table 1. Compiler product predefined macros
Predefined macro name Description Predefined value
__IBMC__ Indicates the level of the XL C compiler. An integer in format VRM, where:
V
Represents the version number
R
Represents the release number
M
Represents the modification number
__xlc__ Indicates the level of the XL C compiler. A string in format V.R.M.F, where:
V
Represents the version number
R
Represents the release number
M
Represents the modification number
F
Represents the fix level
__xlC__ Indicates the VR level of the XL C compilers in hexadecimal format. A 4-digit hexadecimal integer in format 0xVVRR, where:
V
Represents the version number
R
Represents the release number
__xlC_ver__ Indicates the MF level of the XL C compilers in hexadecimal format. An 8-digit hexadecimal integer in format 0x0000MMFF, where:
M
Represents the modification number
F
Represents the fix level

For example, in PTF 3, the value of the macro is 0x00000003.



Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us