Compiler Options for the 64-Bit Environment

The compiler options that are described in this section enable you to do the following:

Some of these options already exist in the 32-bit environment but have new settings particular to the 64-bit architecture. This section only covers the new settings for these cases. The options that are grouped here are primarily for developers who are targetting 64-bit platforms.

-q32 Option

Syntax

-q32

Enables 32-bit compilation bit mode (or, more briefly, 32-bit mode) support in a 64-bit environment. The -q32 option indicates the compilation bit mode and, together with the -qarch option, determines the target machines that the 32-bit executable will run on.

Rules

Examples

-q64 Option

Syntax

-q64
 

Indicates the 64-bit compilation bit mode and, together with the -qarch option, determines the target machines on which the 64-bit executable will run. The -q64 option indicates that the object module will be created in 64-bit object format and that the 64-bit instruction set will be generated. Note that you may compile in a 32-bit environment to create 64-bit objects, but you must link them in a 64-bit environment with the -q64 option.

Rules

Examples

This example targets the RS64II (also known as RS64b) in 64-bit mode:

-q32 -qarch=rs64b -q64

In this example 64-bit compilation that targets the common group of 64-bit architectures (which currently consists only of the RS64II, RS64III, POWER3, POWER4, POWER5, and PowerPC 970):

-q64 -qarch=com
arch setting is silently upgraded to ppc64, the most "common" 64-bit mode compilation target.

-qwarn64 Option

Syntax

-qwarn64 | -qnowarn64

Aids in porting code from a 32-bit environment to a 64-bit environment by detecting the truncation of an 8-byte integer pointer to 4 bytes. The -qwarn64 option uses informational messages to identify statements that may cause problems with the 32-bit to 64-bit migration.

Rules

IBM Copyright 2003