Thanks,
// ==================================================
// __xlC__ indicates the level of the XL C++ compiler
// as a three-digit hexadecimal constant, representing
// version, release, and modification number.
// Using the XL C compiler also automatically defines this macro.
// ==================================================
#include <iostream>
int main()
{
#if (defined __xlC__)
std::cout << "Version : " << (__xlC__ >> 8) << std::endl;
std::cout << "Release : " << ((__xlC__ >> 4) & 0xF) <<
std::endl;
std::cout << "Modification: " << (__xlC__ & 0xF) << std::endl;
#endif
return 0;
}
xlC_r aix.cpp
a.out
Version : 8
Release : 0
Modification: 0
xlC_r -qversion
IBM XL C/C++ Enterprise Edition V8.0 for AIX
Version: 08.00.0000.
0014
So, program aix.cpp doesn't generate full version (including
0014 in
our case).
Is it possible within C/C++ program to get full version of compiler.?
Regards,
Alex Vinokur