Migrating from earlier versions to the latest version
When you migrate applications from earlier versions to the latest version, consider factors including changed compiler options, built-in functions, and environment variables.
Changed compiler options
- -qaltivec
- Starting from IBM® XL C/C++ for Linux, V13.1.6, the -qaltivec option takes effect only when you include the altivec.h file and set or imply -mcpu (-qarch) to be an architecture that supports vector instructions. Otherwise, the compiler ignores -qaltivec and issues a warning message.
- -qxlcompatmacros
- Starting from IBM XL C/C++ for Linux, V13.1.6, -qnoxlcompatmacros is set to default. To define these legacy macros: __xlC__, __xlC_ver__, __IBMCPP__, __IBMC__, and __xlc__, you must explicitly specify -qxlcompatmacros.
Changed environment variables
- XLSMPOPTS
- Starting from IBM XL C/C++ for Linux, V13.1.6, XLSMPOPTS=target=optional is renamed to XLSMPOPTS=target=default with the identical functionality, and XLSMPOPTS=target=disable is renamed to XLSMPOPTS=target=disabled with the identical functionality.
Changed built-in functions
Starting from IBM XL
C/C++ for Linux, V13.1.6, you must include altivec.h to
use the following built-in functions..
- vec_cntlz
- Starting from IBM XL C/C++ for Linux, V13.1.5, the data types of the returned value are changed: now the compiler returns the same type as the argument, instead of always returning an unsigned type.
- You can refer to the following table
for the differences:
Table 1. Result and argument types of different releases Argument Result (release versions before IBM XL C/C++ for Linux, V13.1.5) Result (release versions starting from IBM XL C/C++ for Linux, V13.1.5) vector signed char vector unsigned char vector signed char vector unsigned char vector unsigned char vector unsigned char vector signed short vector unsigned short vector signed short vector unsigned short vector unsigned short vector unsigned short vector signed int vector unsigned int vector signed int vector unsigned int vector unsigned int vector unsigned int vector signed long long vector unsigned long long vector signed long long vector unsigned long long vector unsigned long long vector unsigned long long - When you migrate programs from earlier versions to release versions starting from IBM XL C/C++ for Linux, V13.1.5 for little endian distributions, this change might cause incompatibility. It is recommended that you change your code according to the new behavior.