C for AIX Compiler Reference
SC09-4960-00
C for AIX Compiler Reference
SC09-4960-00
Before using this information and the product it supports, be sure to read the information in “Notices” on page 357.
May 2002 Edition
This edition applies to Version 6 Release 0 of C for AIX (product number 5765–F57) and to all subsequent releases
and modifications until otherwise indicated in new editions.
IBM
®
welcomes your comments. You can send them by either of the following methods:
v Internet: compinfo@ca.ibm.com
Be sure to include your e-mail address if you want a reply.
v By mail to the following address:
IBM Canada Ltd. Laboratory
Information Development
B3/KB7/8200/MKM
8200 Warden Avenue
Markham, Ontario, Canada L6G 1C7
Include the title and order number of this book, and the page number or topic related to your comment.
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,2002. All rights reserved.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
How to read syntax diagrams .....vii
Symbols...............vii
Syntax items ..............vii
Syntax examples ............viii
Part 1. Concepts ..........1
C for AIX Compiler ..........3
Compiler Modes .............3
Compiler Options.............4
Types of Input Files ............5
Types of Output Files ...........6
Compiler Message and Listing Information ....7
Compiler Messages ...........7
Compiler Listings............7
Program Parallelization ........9
IBM SMP Directives ............9
OpenMP Directives ............10
Countable Loops ............11
Reduction Operations in Parallelized Loops . . . 12
Shared and Private Variables in a Parallel
Environment ..............13
Using C for AIX with Other
Programming Languages.......15
Part 2. Tasks ...........17
Set Up the Compilation Environment 19
Set Environment Variables .........19
Set Environment Variables in bsh, ksh, or sh
Shells ...............19
Set Environment Variables in csh Shell ....19
Set Environment Variables to Select 64- or 32-bit
Modes................20
Set Parallel Processing Run-time Options ....20
Set Environment Variables for the Message and
Help Files ...............20
Invoke the Compiler .........23
Invoke the Linkage Editor .........23
Specify Compiler Options ......25
Specify Compiler Options on the Command Line. . 25
-qOptions..............25
FlagOptions.............26
Specify Compiler Options in Your Program Source
Files .................27
Specify Compiler Options in a Configuration File. . 27
TailoraConfigurationFile........28
Configuration File Attributes .......28
Specify Compiler Options for Architecture-Specific,
32-or64-bitCompilation..........29
Resolving Conflicting Compiler Options .....31
Specify Path Names for Include Files 33
Directory Search Sequence for Include Files Using
RelativePathNames...........33
Control Parallel Processing with
Pragmas ..............35
Use C with Other Programming
Languages .............37
Interlanguage Calling Conventions ......37
Corresponding Data Types .........37
Special Treatment of Character and Aggregate
Data................38
Use the Subroutine Linkage Conventions in
Interlanguage Calls ............39
Interlanguage Calls - Parameter Passing ....40
Interlanguage Calls - Call by Reference
Parameters .............41
Interlanguage Calls - Call by Value Parameters 42
Interlanguage Calls - Rules for Passing
Parameters by Value ..........42
Interlanguage Calls - Pointers to Functions . . . 44
Interlanguage Calls - Function Return Values . . 44
Interlanguage Calls - Stack Floor ......45
Interlanguage Calls - Stack Overflow .....45
Interlanguage Calls - Traceback Table.....46
Interlanguage Calls - Type Encoding and
Checking..............46
Sample Program: C Calling Fortran ......47
Part 3. Reference .........49
Compiler Options ..........51
Compiler Command Line Options .......51
# (pound sign) ............59
32,64...............60
aggrcopy ..............61
alias................62
align................64
alloca...............68
ansialias..............69
arch................70
assert ...............73
attr................74
B.................75
b.................76
bitfields ..............77
bmaxdata ..............78
brtl................79
C.................80
© Copyright IBM Corp. 1995,2002 iii
评论8
最新资源