Specify Compiler Options for Architecture-Specific, 32- or 64-bit Compilation

You can use IBM XL C/C++ compiler options to optimize compiler output for use on specific processor architectures. You can also instruct the compiler to compile in either 32- or 64-bit mode.

The compiler evaluates compiler options in the following order, with the last allowable one found determining the compiler mode:

  1. Internal default (32-bit mode)
  2. Configuration file settings
  3. Command line compiler options (-q32, -q64, -qarch, -qtune)
  4. Source file statements (#pragma options tune=suboption)

The compilation mode actually used by the compiler depends on a combination of the settings of the -q32, -q64, -qarch and -qtune compiler options, subject to the following conditions:

Possible option conflicts and compiler resolution of these conflicts are described below:

Related Concepts

Compiler Options

Related Tasks

Invoke the Compiler
Specify Compiler Options on the Command Line

Related References

Compiler Command Line Options
Resolving Conflicting Compiler Options IBM Copyright 2003