-qxlcompatmacros

Pragma equivalent

None

Purpose

The option -qxlcompatmacros controls definition of the following legacy macros: __xlC__, __xlC_ver__, C++ only begins__IBMCPP__C++ only ends, C only begins__IBMC__, and __xlc__C only ends.

For releases starting from IBM® XL C/C++ for Linux, V16.1, the default is -qnoxlcompatmacros. However, compared with earlier versions, this may have impacts on configuring make files with IBM XL C/C++ for Linux for little endian distributions, as both __clang__ and __gcc__ macros are also defined.

You may need to use the -qxlcompatmacros option under these circumstances:

  • when you migrate programs from IBM XL C/C++ for AIX® to IBM XL C/C++ for Linux for little endian distributions;
  • when you migrate programs from IBM XL C/C++ for Linux for big endian distributions to IBM XL C/C++ for Linux for little endian distributions;
  • when you migrate programs from earlier versions of XL C/C++ for little endian distributions to the latest.

Alternatively, you can change instances of the legacy maros to __ibmxl__, which is always defined in all versions of XL C/C++ for Linux for little endian distributions.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-noxlcompatmacros-.   
>>- -q--+-xlcompatmacros---+-----------------------------------><

Defaults

-qnoxlcompatmacros

Predefined macros

The following macros are defined when the -qxlcompatmacros option is in effect; otherwise, they are undefined.

  • C++ only begins__IBMCPP__C++ only ends
  • C only begins __IBMC__ C only ends
  • C only begins __xlc__C only ends
  • __xlC__
  • __xlC_ver__


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