IB M XL C/C++ Enterprise Edition V8.0 for AIX
Compiler Reference
SC09-7995-00
IB M XL C/C++ Enterprise Edition V8.0 for AIX
Compiler Reference
SC09-7995-00
Note!
Before using this information and the product it supports, be sure to read the information in “Notices” on page 443.
First Edition (August 2005 )
This edition applies to IBM XL C/C++ Enterprise Edition V8.0 for AIX (Program number 5724-M12) and to all
subsequent releases and modifications until otherwise indicated in new editions.
IBM welcomes your comments. You can send them by Internet: compinfo@ca.ibm.com
Include the title and order number of this book, and the page number or topic related to your comment. Please
remember to include your e-mail address if you want a reply.
When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any
way it believes appropriate without incurring any obligation to you.
© Copyright International Business Machines Corporation 1995, 2005. All rights reserved.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
About this document . . . . . . . . vii
Who should read this document . . . . . . . vii
How to use this document . . . . . . . . . vii
How this document is organized . . . . . . . vii
Conventions used in this document . . . . . . viii
Typographical conventions . . . . . . . . viii
Icons . . . . . . . . . . . . . . . viii
How to read syntax diagrams . . . . . . .ix
Related information . . . . . . . . . . . .xi
Additional documentation . . . . . . . . xii
Technical support . . . . . . . . . . . . xii
How to send your comments . . . . . . . . xiii
Chapter 1. Configuring the compiler . .1
Setting up the compilation environment . . . . .1
Setting environment variables . . . . . . .1
Setting environment variables to select 32-bit or
64-bit modes . . . . . . . . . . . . .2
Setting parallel processing environment variables 2
Setting other environment variables . . . . .7
Customizing the configuration file . . . . . . .9
Tailoring a configuration file . . . . . . . .10
Configuration file attributes . . . . . . . .10
Chapter 2. Invoking the compiler or a
compiler component . . . . . . . . .13
Types of input files . . . . . . . . . . . .16
Selecting an appropriate object model . . . . .17
Controlling the compiler outputs . . . . . . .17
Types of output files . . . . . . . . . .18
Compiler messages . . . . . . . . . . .19
Compiler listings . . . . . . . . . . .21
Compiler return codes . . . . . . . . . .22
Paging space errors during compilation . . . .22
Invoking the preprocessor . . . . . . . . .23
Invoking the linkage editor . . . . . . . . .23
Chapter 3. Specifying compiler options 25
Specifying compiler options on the command line 25
Specifying compiler options in program source files 27
Specifying compiler options in a configuration file 28
Resolving conflicting compiler options . . . . .29
Specifying compiler options for architecture-specific,
32-bit or 64-bit compilation . . . . . . . . .30
Chapter 4. Specifying path names for
include files . . . . . . . . . . . .39
Directory search sequence for include files using
relative path names . . . . . . . . . . . .39
Chapter 5. Libraries in XL C/C++ . . . .41
Redistributable libraries . . . . . . . . . .42
Order of linking . . . . . . . . . . . . .43
Chapter 6. Compiler options reference 45
Summary of compiler options by functional
category . . . . . . . . . . . . . . .45
Options that control input . . . . . . . .45
Options that control output . . . . . . . .47
Options for performance optimization . . . .49
Options for error checking and debugging . . .52
Options that control listings and messages . . .53
Options for compatibility . . . . . . . . .55
Options that control integer and floating-point
processing . . . . . . . . . . . . . .55
Options that control linking . . . . . . . .55
Options for customizing the compiler . . . .56
Individual option descriptions . . . . . . . .57
-+ (plus sign) . . . . . . . . . . . . .58
-# (pound sign) . . . . . . . . . . . .59
-q32, -q64 . . . . . . . . . . . . . .60
-qaggrcopy . . . . . . . . . . . . .61
-qalias . . . . . . . . . . . . . . .62
-qalign . . . . . . . . . . . . . . .64
-qalloca . . . . . . . . . . . . . . .66
-qaltivec . . . . . . . . . . . . . .67
-qansialias . . . . . . . . . . . . . .68
-qarch . . . . . . . . . . . . . . .69
-qasm . . . . . . . . . . . . . . .74
-qasm_as . . . . . . . . . . . . . .76
-qassert . . . . . . . . . . . . . . .77
-qattr . . . . . . . . . . . . . . .78
-B . . . . . . . . . . . . . . . .79
-b . . . . . . . . . . . . . . . . .80
-qbitfields . . . . . . . . . . . . . .81
-bmaxdata . . . . . . . . . . . . . .82
-brtl . . . . . . . . . . . . . . . .83
-C . . . . . . . . . . . . . . . .84
-c . . . . . . . . . . . . . . . . .85
-qcache . . . . . . . . . . . . . . .86
-qchars . . . . . . . . . . . . . . .88
-qcheck . . . . . . . . . . . . . . .89
-qcinc . . . . . . . . . . . . . . .91
-qcompact . . . . . . . . . . . . . .92
-qcpluscmt . . . . . . . . . . . . . .93
-qcpp_stdinc . . . . . . . . . . . . .97
-D . . . . . . . . . . . . . . . .98
-qdataimported . . . . . . . . . . . . 100
-qdatalocal . . . . . . . . . . . . . 101
-qdbxextra . . . . . . . . . . . . . 102
-qdigraph . . . . . . . . . . . . . 103
-qdirectstorage . . . . . . . . . . . . 105
-qdollar . . . . . . . . . . . . . . 106
-qdpcl . . . . . . . . . . . . . . . 107
-qdump_class_hierarchy . . . . . . . . . 108
-E . . . . . . . . . . . . . . . . 109
-e . . . . . . . . . . . . . . . . 111
-qeh . . . . . . . . . . . . . . .112
-qenablevmx . . . . . . . . . . . . .113
-qenum . . . . . . . . . . . . . .114
© Copyright IBM Corp. 1995, 2005 iii