C Set ++ for AIX Compiler
Usage:
xlC [ option | inputfile ]...
xlc [ option | inputfile ]...
cc [ option | inputfile ]...
c89 [ option | inputfile ]...
xlC128 [ option | inputfile ]...
xlc128 [ option | inputfile ]...
cc128 [ option | inputfile ]...
xlC_r [ option | inputfile ]...
xlc_r [ option | inputfile ]...
cc_r [ option | inputfile ]...
icc [ option | inputfile ]...
ixlc [ option | inputfile ]...
ic89 [ option | inputfile ]...
ixlc128 [ option | inputfile ]...
icc128 [ option | inputfile ]...
ixlc_r [ option | inputfile ]...
icc_r [ 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>.
-r Permits the output file to be produced even if it
contains unresolved symbols.
-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.
fdpr Collect information about programs for use with
the AIX fdpr (Feedback Directed Program Restructuring)
performance-tuning utility.
funcsect Place instructions for each function in a separate csect.
flttrap Generate instructions to trap floating-point
exceptions.
fold Specifies that constant floating-point expressions
are to be evaluated at compile time.
fullpath Specifies the path information stored for files when
you use -g and the symbolic debugger (dbx).
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.
ldbl128 Increase long double size from 64 to 128 bits.
libansi Assumes that all functions with the names of ANSI
C library functions are in fact the system functions.
list Produce an object listing; output goes to .lst file.
listopt Display the settings of all options; output goes
to .lst file.
longdouble Increase long double size from 64 to 128 bits.
longlong Allow long long integers.
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.
pdf1, pdf2 Perform aggressive optimizations with profile
directed feedback.
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.
roconst Put constant values 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.
som Turn on implicit SOM mode. This causes the file som.hh
to be included. It is equivalent to placing
#pragma SOMAsDefault(on) at the start of the
translation unit. All classes are implicitly derived
from "SOMObject" until a #pragma SOMAsDefault(off)
is encountered.
somgs Disable direct access to attributes. Instead, the get
and set methods are used. This is equivalent to
specifying #pragma SOMNoDataDirect(on) as the first
line of the translation unit.
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.
statsym Adds user-defined, nonexternal names that have a
persistent storage class, such as initialized and
uninitialized static variables, to the name list
(the symbol table of xcoff objects).
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.
twolink (C++ only) Link twice in order to minimize the number
of static constructors included from libraries (default
with langlvl=compat).
unique Generates unique names for static constructor/destructor
file compilation units.
upconv Preserves the unsigned specification when performing
integral promotions.
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.
ppcgr Produce an object that contains optional
graphics instructions for PowerPC processors.
The default is -qarch=com. If the -qarch option is
specified without the -qtune=<option>, the compiler
uses -qtune=pwr.
assert=<option>
Specifies the aliasing assertion to be applied to
your compilation unit.
The available options are:
typ Pointers to different types are never aliased.
allp Pointers are never aliased.
addr Variables are disjoint from pointers
unless their address is taken.
attr=full Produce an attribute listing containing all names,
whether referenced or not; output goes to .lst file.
chars=signed
chars=unsigned
Specify whether the data type char will be signed
or unsigned.
cinc=<prefix>
Includes files from /usr/include by inserting
extern "C" {
before each <prefix> and inserting } after it.
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.
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:
emulate Function calls are emitted in place of
PowerPC floating-point instructions.
Use this option only in a single-threaded
stand-alone environment, targeting the
PowerPC 403 processor.
Do not use this suboption with any of the
following:
o -qarch=pwr, -qarch=pwr2, -qarch=pwrx
o -qlongdouble, -qldbl128
o xlC128, xlc128 invocation commands
fltint Specify whether range checking of floating
point to integer conversions is done.
Default at -O2: -qfloat=nofltint.
Default at -O3: -qfloat=fltint.
hsflt Never round single-precision expressions,
and don't perform range checking for
floating-point to integer conversions.
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.
nomaf Suppress generation of multiply-add
instructions.
nofold Suppress compile-time evaluation of constant
floating-point expressions.
rndsngl Ensure strict adherence to IEEE standard.
all operations on single-precision values
produce results that remain in single
precision.
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.
spnans Generate extra instructions to detect signalling
NaN on conversion from single precision to
double precision. Obsolete; use the equivalent
-qfloat=nans option.
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.
genpcomp[=dirname]
Generate pretokenized include files. See C Set ++
User's Guide for details.
genproto=<parmnames>
Produces ANSI prototypes from K&R function definitions.
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.
prioriry=NNN
priority=<num>
Specifies the priority level for the initialization
of static constructors.
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.
sominc=<dir1>:<dir2>: ...
Include or exclude files in the specified
directories when implicit SOM mode is turned on
(when classes are implicitly derived from SOM).
Use these options to mix implicit SOM mode with existing
include files that include declarations of classes you
do not want to be implicit SOM classes.
somro=<class_name>
Write the release order of the specified class to
standard output. The release order is written in the
form of a SOMReleaseOrder pragma. You can capture the
output from this option when developing new SOM classes,
and include the pragma in the class definition.
spill=<size>
Specify the size of the register allocation spill
area.
tabsize=<size>
Change the length of tabs in your source file.
tbtable=<option>
Generate a traceback table for each function and
place it in the text segment at the end of the
function code.
The available options are:
none No traceback table is generated.
full A full traceback table is generated.
This is the default with -g specified.
small A traceback table is generated with no name or
parameter information.
This is the default when -g is NOT specified.
tune=<option>
Specifies the architecture system for which the
executable program is optimized.
The available options are:
403 Produce an object optimized for all the
PowerPC 403 processors.
Use -qfloat=emulate to emulate the floating-point
instructions omitted by the 403 processor.
601 Produce an object optimized for all the
PowerPC 601 processors.
603 Produce an object optimized for all the
PowerPC 603 processors.
604 Produce an object optimized for all the
PowerPC 604 processors.
pwr Produce an object optimized for the POWER
hardware platform.
pwr2 Produce an object optimized for the
POWER2 hardware platform.
pwr2s Produce an object optimized for the
POWER2 hardware platform, avoiding certain
quadruple-precision instructions that would
slow program performance.
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.
unroll[=n] Allow the optimizer to unroll loops.
usepcomp[=dirname]
Use pretokenized include files. See C Set ++ User's
Guide for details.
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.