C Set ++ for AIX Compiler
Usage:
xlC [ option | inputfile ]...
xlc [ option | inputfile ]...
cc [ option | inputfile ]...
c89 [ option | inputfile ]...
icc [ option | inputfile ]...
ixlc [ option | inputfile ]...
ic89 [ option | inputfile ]...
Description:
The xlC and related commands compile C and C++ source files.
They also processes assembler source files and object files. Unless the
-c option is specified, xlC calls the linkage editor to produce a
single object file. Input files may be any of the following:
1. file name with .C suffix: C++ source file
2. file name with .i suffix: preprocessed C or C++ source file
3. file name with .c suffix: C source file
4. file name with .o suffix: object file for ld command
5. file name with .s suffix: assembler source file
Options:
Options can be flag options or keyword options:
1. Flag options:
-# Display language processing commands but do
not invoke them; output goes to stdout.
-+ Treat .c files as C++ source code.
-a Produce test coverage information; output goes to .d file.
-ae Produce test coverage information, expecting C++
exception handling to disrupt the normal flow of
control; output goes to .d file.
-B{prefix}
Construct alternate compiler/assembler/linkage editor
program names. {prefix} is added to the beginning of
the standard program names.
-c Do not send object files to the linkage editor.
-C Write comments to output when doing preprocessing,
used with -E and -P.
-D{name}[={def}]
Define {name} as in #define directive. If {def} is
not specified, 1 is assumed.
-E Preprocess but do not compile; output goes to stdout
-F{x}[:{stanza}]
Use alternate configuration file {x} with optional
{stanza}. If {stanza} is not specified, xlC is
assumed.
-g Produce information for the debugger.
-I{dir} Search in directory {dir} for include files that
do not start with an absolute path.
-l{key} Search the specified library file,
where {key} selects the file lib{key}.a.
-L{dir} Search in directory {dir} for files specified by -l{key}.
-ma Generate inline calls to the "alloca" function as if
"#pragma alloca" directives were in the source file.
-M Generate information to be included in a "make"
description file; output goes to .u file.
-o{name} Name the executable file {name} instead of a.out.
When used with the -c option and one source file,
name the object file {name} instead of filename.o.
-O Optimize generated code.
-O2 Equivalent level of optimization as -O in the
previous release.
-O3 Perform some memory and compile time intensive
optimizations in addition to those executed with -O2.
The -O3 specific optimizations have the potential to
alter the semantics of a user's program.
The compiler guards against these optimizations at -O2
and the option -qstrict is provided at -O3 to turn off
these aggressive optimizations.
-p Generate profiling support code.
-pg Generate profiling support code including BSD
profiling support.
-P Preprocess but do not compile; output goes to .i file.
-Q (C++) Requests inlining of inline routines.
-Q! (C++) Turns off inlining.
-Q{x} (C) Inline all appropriate functions where x can be
one of the following:
! Not inline any function
={lc} Inline if number of source statement in
function is less than the number specified
in {lc}.
-{nm} Not inline function listed by names in {nm}
+{nm} Attempt to inline function listed by names
in {nm}.
-S Produce a .s file for any source file processed by the
compiler.
-t{x} Apply prefix from the -B option to the specified program {x},
where x can be one or more of the following:
p = preprocessor
c = compiler frontend
b = compiler backend
i = compiler inliner
a = assembler
l = linkage editor.
m = 'munch' utility
f = C++ name demangler utility
I = inter procedural analysis
-U{name} Undefine name as in #undef directive.
-v Displays language processing commands as they
are invoked by xlC; output goes to stdout.
-w Suppress informational, language-level, and warning messages.
-W{x,y} Give the options {y} to the compiler program {x}
where x can be one or more of the following:
{p,c,b,i,a,l,I,m,f}
-y{x} Specify compile-time rounding of constant floating-point
expressions, where {x} can be one of the following:
n = round to nearest
m = round toward minus infinity
p = round toward positive infinity
z = round toward zero.
2. Keyword options:
Keyword options are specified in one of the following ways:
-q{option}
-q{option}={parameter}
-q{option}={parameter}:{parameter}
where {option} is an option name and {parameter} is a
parameter value.
Keyword options with no parameters represent switches
that may be either on or off. The keyword by itself turns
the switch on, and the keyword preceded by the letters NO
turns the switch off. For example, -qLIST tells the
compiler to produce a listing and -qNOLIST tells the
compiler not to produce a listing. If an option that
represents a switch is set more than once, the compiler
uses the last setting.
Keyword option and parameter names may appear in either
UPPER CASE or lower case letters in the xlC command.
Options without parameters:
ansialias Use type-based aliasing during optimization.
attr Produce an attribute listing containing only
referenced names; output goes to .lst file.
browse Produce information for the source code browser;
output goes to .brs file.
check Generate code to check for integer division by 0.
compact Reduce code size where possible, at the expense
of execution speed. Code size is reduced by
inhibiting optimizations that replicate or expand
code inline.
cpluscmt (C only) Permit "//" to introduce a comment that lasts
until the end of the current source line, as in C++.
dbcs String literals and comments can contain DBCS
characters (same as mbcs option).
dbxextra Generate symbol table information for unreferenced
variables. By default such information is not generated
thus reducing the size of the executable compiled with
the "-g" option.
digraph Allow special digraph and keyword operators.
dollar Allow '$' as an identifier character
extchk Perform external name type-checking and function
call checking.
flttrap Generate instructions to trap floating-point exceptions.
genpcomp[=dirname]
Generate pretokenized include files. See C Set ++
User's Guide for details.
hd Generate additional information for use with the
HeapView Debugger
idirfirst Specify the search order for files included with
the #include "file_name" directive. Use -qidirfist
with the -Idirectory option. If -qidirfirst option
is specified, the directories specified by the
-Idirectory option are searched before the directory
where the current file resides.
ignerrno Tell the optimizer that the program will never refer to
or set errno. This allows additional optimizations.
info Produce more warning and information messages for
possible problems in the program.
inlglue Generate fast external linkage by inlining the
code (pointer glue code) necessary at calls
via a function pointer and calls to external
procedures.
libansi
list Produce an object listing; output goes to .lst file.
listopt Display the settings of all options; output goes
to .lst file.
macpstr Allow '\p' as the first character of a string constant
which will be replaced by the length in bytes.
mbcs String literals and comments can contain DBCS
characters (same as dbcs option).
noprint Direct listing to /dev/null.
nostdinc Specify which files are included with the #include
"file_name" and #include {file_name} directives.
If -qnostdinc is specified, the /usr/include (C) or
/usr/lpp/xlC/include (C++) directory is not searched.
once Only process each include file one time. The default is
-qnoonce.
pascal Accept and ignore the keyword 'pascal' as a type modifier.
phsinfo Produce compiler phase information; output goes to stdout.
proto (C only) Assert that procedure call points agree
with their declarations even if the procedure has
not been prototyped. This allows the caller to
pass floating point arguments in floating point
registers instead of general purpose registers.
ro Put string literals in read only area.
rwvftable (C++ only) Place virtual function tables into
read/write memory.
showinc Include the source of all included files in the
source listing, if the SOURCE option is in effect.
source Produce a source listing; output goes to .lst file.
srcmsg Reconstruct source lines in error along with the
diagnostic messages in the stderr file.
strict Valid only at -O3. This option turns off aggresive
optimizations which have the potential to alter the
semantics of a user's program. This option also sets
-qfloat=nofltint:norsqrt.
tempinc Automatically generate template functions in the
"tempinc" subdirectory. Use the "notempinc" option to
suppress this behaviour.
tocdata Place scalar external data of one word or less
in the TOC (Table of Contents). If this option is not
on, the address of scalar external data is placed in the
TOC. This requires an extra load of the address before
accessing the data.
twolink (C++ only) Link twice in order to minimize the number
of static constructors included from libraries (default
with langlvl=compat).
unroll[=n] Allow the optimizer to unroll loops.
usepcomp[=dirname]
Use pretokenized include files. See C Set ++ User's
Guide for details.
vftable (C++ only) Force virtual function tables to be generated
in this compilation unit. The default is to define the
virtual function table for a class where the first
non-inline virtual member function is declared. If
-qnovftable is specified, then no virtual function tables
are produced.
xcall Generate code to static routines within a compilation
unit as if they were external routines.
xref Produce a cross-reference listing containing
only referenced names.
Options with parameters:
align={algnopt}
Specify one of the following three alignment rules:
- POWER architecture (align=power, default)
- two byte alignment (align=twobyte)
- one byte alignment (align=packed)
for aligning C structs and unions. {algnopt} can be
one of: power, twobyte, or packed.
arch={option}
Specifies the architecture on which the executable
program will be run.
The available options are:
com Produce an object that contains instructions
that will run on all the POWER and PowerPC
hardware platforms.
pwr Produce an object that contains instructions
that will run on the POWER hardware
platform.
pwr2 Produce an object that contains instructions
that will run on the POWER2 hardware
platform.
pwrx Same as pwr2.
ppc Produce an object that contains instructions
that will run on any of the 32-bit PowerPC
hardware platforms.
The default is -qarch=com. If the -qarch option is
specified without the -qtune={option}, the compiler
uses -qtune=pwr.
attr=full Produce an attribute listing containing all names,
whether referenced or not; output goes to .lst file.
cache=description
Describe the cache characteristics to the optimizer.
See C Set ++ User's Guide for details.
chars=signed
chars=unsigned
Specify whether the data type char will be signed
or unsigned.
datalocal={name1}:{name2}: ...
Specify which data items are local. If no names are
specified, all data items are assumed to be local.
dataimported={name1}:{name2}: ...
Specify which data items are imported. If no names are
specified, all data items are assumed to be imported.
This is the default.
disjoint={disjointSpec}
Tell the optimizer that certain aliases are impossible.
See C Set ++ User's Guide for details.
enum={enumopt}
Specify whether minimum-sized enumerated types will be
produced or not. {enumopt} can be either small or int.
small denotes that either one, two or four bytes of
storage will be allocated for enum variables based on
the range of the enum constants.
int is the default, and causes enum variables to be
treated as though they were of type (signed) int.
flag={sev1}
Specify severity level of diagnostics to be reported
in source listing and stderr; the severity level
is one of {i,w,e,s,u}.
flag={sev1}:{sev2}
Specify severity level of diagnostics to be reported
in source listing ({sev1}), and stderr ({sev2});
the severity levels are one of {i,w,e,s,u}.
float={opt1}:{opt2}:...:{optN}
The available options are:
rndsngl Ensure strict adherence to IEEE standard.
all operations on single-precision values
produce results that remain in single
precision.
hssngl Round single-precision expressions only
when the results are stored into REAL*4 memory
locations.
nans Detect conversion of single-precision NaNS to
double precision call checking.
hsflt Never round single-precision expressions,
and don't perform range checking for
floating-point to integer conversions.
nomaf Suppress generation of multiply-add
instructions.
nofold Suppress compile-time evaluation of constant
floating-point expressions.
rrm Specify run-time rounding mode. Compile with
this option if the run-time rounding mode
is round toward minus infinity, round toward
positive infinity, or not known.
rsqrt Specify whether a division by the result of a
square root can be replaced with a multiply
by the reciprocal of the square root.
Default at -O2: -qfloat=norsqrt.
Default at -O3: -qfloat=rsqrt.
fltint Specify whether range checking of floating
point to integer conversions is done.
Default at -O2: -qfloat=nofltint.
Default at -O3: -qfloat=fltint.
flttrap={opt1}:{opt2}:...:{optN}
Generate instructions to detect and trap floating-point.
The available options are: overflow, underflow,
zerodivide, invalid, inexact, enable, imprecise.
halt={sev} Stop compiler after first phase if severity of errors
detected equals or exceeds {sev}; the severity
level is one of i, w, e, s, u.
ignprag=disjoint
ignprag=isolated
ignprag=all
Ignore the aliasing pragmas disjoint and/or isolated_call.
initauto={hh}
Initialialize automatic storage to {hh}. {hh} is a
hexadecimal value. This generates extra code and
should only be used for error determination.
ipa[={ipa_options}]
Turn on inter procedural analysis. See C Set ++
User's Guide for details.
isolated_call={name1}:{name2}: ...
Specify that the calls to the functions listed have no
side effects. {name1} and {name2} are function names.
The user may specify as many function names as
necessary.
langlvl={langlvl}
Specify language level to be used during compilation.
{langlvl} can be ansi, compat, or extended.
maxmem={num}
Limit the amount of memory used by space intensive
optimizations to {num}. {num} specified in kilobytes.
priority=NNN
proclocal={name1}:{name2}: ...
Specify which functions are local.
If no filenames are specified, all invoked functions
are assumed to be defined whithin the current file.
The last explicit specification for a function takes
precedence.
procimported={name1}:{name2}: ...
Specify which functions are imported. If no filenames
are specified, all invoked functions are assumed to be
defined outside the current file. The last explicit
specification for a function takes precedence.
procunknown={name1}:{name2}: ...
Specify which functions are unknown to be local or
imported. If no filenames are specified, all functions
called are assumed to be unknown. This is the default
when no user options are specified. The last explicit
specification for a function takes precedence.
spill={size}
Specify the size of the register allocation spill
area.
tune={option}
Specifies the architecture system for which the
executable program is optimized.
The available options are:
601 Produce an object optimized for all the
PowerPC601 processors.
pwr Produce an object optimized for the POWER
hardware platform.
pwr2 Produce an object optimized for the
POWER2 hardware platform.
pwrx Same as pwr2.
tempinc={directory}
Automatically generate template functions in the
specified directory. Use the "notempinc" option
to suppress this behaviour.
tempmax={number}
Specify the maximum number of files to be created in
the tempinc directory for each template file. The
default is 1.
wait[={seconds}]
Specify the number of seconds to wait for a NetLS
license to become available. The default is to wait
forever.
xref=full Produce a cross-reference listing containing
all names, whether referenced or not; output goes
to .lst file.
For a detailed description of each option, please refer to the
C Set ++ for AIX User's Guide.