Language element control

The options in this category allow you to specify the characteristics of the source code. You can also use these options to enforce or relax language restrictions, and enable or disable language extensions.

Table 1. Language element control options
Option name Description
-D

Defines a macro as in a #define preprocessor directive.

-U

Undefines a macro defined by the compiler or by the -D compiler option.

-fasm (-qasm)

Controls the interpretation and subsequent generation of code for assembler language extensions.

-maltivec (-qaltivec)

Enables the compiler support for vector data types and operators.

-fdollars-in-identifiers (-qdollar)

Allows the dollar-sign ($) symbol to be used in the names of identifiers.

-std (-qlanglvl)

Determines whether source code and compiler options should be checked for conformance to a specific language standard, or subset or superset of a standard.

-qstaticinline (C++ only)

Controls whether inline functions are treated as having static or extern linkage.

-X (-W)

-Xassembler option or -Wa,option passes the listed option directly to the assembler.

The following options are supported by XL C/C++ for GCC compatibility. For details about these options, see the GNU Compiler Collection online documentation at http://gcc.gnu.org/onlinedocs/.
  • -ansi
  • -fconstexpr-depth
  • -ffreestanding
  • -fgnu89-inline
  • -fhosted
  • -fno-access-control
  • -fno-builtin
  • -fno-gnu-keywords
  • -fno-operator-names
  • -fno-rtti
  • -fpermissive
  • -fsigned-char
  • -ftemplate-backtrace-limit
  • -ftemplate-depth
  • -funsigned-char
  • -trigraphs
  • -Xassembler option


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