-qxlcompatmacros

Pragma equivalent

None

Purpose

Defines the following legacy macros: C++ only begins__IBMCPP__, __xlC__, __xlC_ver__C++ only ends, C only begins__IBMC__, and __xlc__C only ends. This option helps you migrate programs from IBM® XL C/C++ for Linux for big endian distributions to IBM XL C/C++ for Linux V13.1.2 for little endian distributions.

Syntax

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

Defaults

-qxlcompatmacros

Usage

The -qxlcompatmacros option is enabled by default to help you migrate programs from Linux for big endian distributions to Linux for little endian distributions. This means that the compiler predefines C++ only begins__IBMCPP__, __xlC__, __xlC_ver__C++ only ends, C only begins__IBMC__, and __xlc__C only ends.

When you migrate programs from V13.1.1 Linux for little endian distributions to V13.1.2 Linux for little endian distributions, it is recommended that you use the -qnoxlcompatmacros option to undefine these legacy macros. This is because these legacy macros, if defined, might change your source code and result in compilation failure.

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
  • C++ only begins__xlC__C++ only ends
  • C++ only begins__xlC_ver__C++ only ends


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