xlc(1) IBM XL C/C++ for Linux, V11.1 xlc(1)
NNAAMMEE
xlc, xlc++, xlC, cc, c89, c99 and related commands - invoke the IBM XL
C/C++ compiler.
SSYYNNTTAAXX
_<_i_n_v_o_c_a_t_i_o_n_-_c_o_m_m_a_n_d_> [[ _<_o_p_t_i_o_n_> || _<_i_n_p_u_t_f_i_l_e_> ]] ......
DDEESSCCRRIIPPTTIIOONN
The invocation commands compile C and C++ source files.
The commands and their recommended usages are described below.
Invocations Usage (supported standards)
_________________________________________________________
xlc, xlc_r Compile C source files.
(ANSI C89, ISO C99,
IBM language extensions)
xlc++, xlc++_r, xlC, Compile C++ source files.
xlC_r
cc, cc_r Compile legacy code that
does not conform to Standard
C. (pre-ANSI C)
c89, c89_r Compile C source files with
strict conformance to the
C89 standard. (ANSI C89)
c99, c99_r Compile C source files with
strict conformance to the
C99 standard. (ISO 99)
gxlc Accepts GNU C options, maps
them to their equivalent XL
C option, then invokes xlc.
gxlc++, gxlC Accepts GNU C/C++ options,
maps them to their equivalent
XL C++ option, then invokes
xlc++.
The main difference between these commands is that they use different
default options (which are set in the configuration file
/opt/ibmcmp/vac/11.1/etc/vac.cfg).
See the Compiler Reference for more information on these invocation
commands.
All invocations with a suffix of __rr allow for thread-safe compilation.
Use these commands to create threaded applications or to link programs
that use multi-threading.
These commands also process assembler source files and object files.
The compiler calls the link editor to produce a single executable or
shared library, unless you specify the compiler options that prevent
object files from being linked.
The input file may have any of the following suffixes:
.C, .cpp, .cxx, C++ source file
.cc, .cp, .c++
.c C source file
.i Preprocessed C or C++ source file
.a Archive file
.o Object file for ld command
.s Assembler source file
.S Assembler source file that
needs preprocessing
.so Shared object file
OOPPTTIIOONNSS
Compiler options are categorized by their functions and may be used to
set the compiler behavior. Options can be flag options or keyword
options.
Keyword options are specified in one of the following ways:
-q
-q =
-q=:
Keyword options with no suboptions represent switches that may be
either on or off. -qx turns the switch on, and -qnox turns the switch
off. For example, -qsource tells the compiler to produce a source
listing and -qnosource tells the compiler not to produce a source
listing.
OOuuttppuutt ccoonnttrrooll ooppttiioonnss
-c Instructs the compiler to pass source files to the compiler
only. The compiled source files are not sent to the linker. This
option produces an object file, file_name.o, for each valid
source file.
-C | -C!
Preserves or removes comments in preprocessed output.
When -C is used with the -E option, comments are written to
standard output; with the -P option, comments are written to an
output file.
When -C! is in effect, comments are removed.
-E Instructs the compiler to preprocess the source files and send
preprocessed source to standard output.
-M Creates an output file that contains information to be included
in a "make" description file. This is equivalent to specifying
-qmakedep without a suboption.
-qmakedep[=gcc]
Creates an output file that contains targets suitable for
inclusion in a description file for the make command that
describes the dependencies of the main source file in the
compilation.
Specifying ’gcc’ changes the format of the generated dependency
file.
Specifying -qmakedep without ’gcc’ is equivalent to specifying
-M.
-MF
Specifies the target for the output generated by the -qmakedep
or -M options, where can be a full directory path or file
name. Note that "-MF " (with a space before the argument)
is also acceptable. This option only has effect when specified
with -qmakedep or -M.
-qmkshrobj
Creates a shared object from the generated object files.
Specifying -qmkshrobj implies -qpic.
See related options, -e and -o .
-o
Specifies an output location for the object, assembler, or
executable files created by the compiler. When the -o option is
used during compiler invocation, can be the name of
either a file or a directory.
DDeeffaauulltt:: -o a.out
-P Preprocesses the C or C++ source files named in the compiler
invocation and creates an output preprocessed source file for
each input source file. The preprocessed output file has the
same name as the output file, with a .i suffix.
-S Generates an assembler language file (.s) for each source file.
The resulting .s files can be assembled to produce object .o
files or an executable file (a.out).
-qshowmacros[=] | -qnoshowmacros
Emits macro definitions to preprocessed output.
This option has no effect unless preprocessed output is
generated. If a macro is defined and subsequently undefined
before compilation ends, this macro will not be included in the
preprocessed output.
DDeeffaauulltt:: -qnoshowmacros
is a colon-separated list of one or more of
the following:
all
-qshowmacros=all appends all macro definitions to
preprocessed output. This is the same as specifying
-qshowmacros.
pre | nopre
-qshowmacros=pre appends only predefined macro definitions
to preprocessed output. -qshowmacros=nopre suppresses
appending these definitions.
Only macros defined internally by the preprocessor are
considered predefined; all other macros are considered as
user-defined.
-qtimestamps | -qnotimestamps
Controls whether or not implicit time stamps are inserted into
an object file.
This option does not affect time stamps inserted by pragmas and
other explicit mechanisms.
DDeeffaauulltt:: -qtimestamps
IInnppuutt ccoonnttrrooll ooppttiioonnss
-+ (C++) Compiles any file, , as a C++ language
file, where is any suffix other than .a, .o, .so, .s, or
.S. This option is equivalent to the -qsourcetype=c++ option
and should not be used together with the -qsourcetype option.
-qcinc= | -qnocinc
(C++) Instructs the compiler to place an extern "C" { } wrapper
around the contents of an include file, where
is the location of that include file.
DDeeffaauulltt:: -qnocinc
-I
Specifies an additional search path for include file names that
do not specify an absolute path.
DDeeffaauulltt::
The following directories are searched, in the following
order, after any paths that are specified by the -I option:
1) The current directory.
2) The directory where the source file is located.
3) /usr/include.
-qidirfirst | -qnoidirfirst
Specifies the search order for files included with the #include
"" directive. Use -qidirfirst with the -I option. If
-qidirfirst is specified, the directories specified by the
-I option are searched before the directory in
which the current file resides.
DDeeffaauulltt:: -qnoidirfirst
-qinclude=
Specifies additional header files that are included before the
first line of a source file in a compilation unit and ahead of
any headers which may be specified by an #include statement on
the first line of the source file.
-qsourcetype=
Determines whether to treat all recognized source files as if
they are of the source type specified by (regardless of
file name suffix), or whether to use the file name suffix to
determine the programming language.
Note that the option only affects files that are specified on
the command line following the option, but not those that
precede the option. The -qsourcetype option should not be used
together with the -+ option. The suboptions are:
default
The compiler assumes that the programming language of a
source file will be implied by its file name suffix.
c
The compiler compiles all source files following this
option as if they are C language source files.
c++
The compiler compiles all source files following this
option as if they are C++ language source files.
assembler
The compiler compiles all source files following this
option as if they are assembler language source files.
assembler-with-cpp
The compiler compiles all source files following this
option as if they are assembler language source files that
need preprocessing.
DDeeffaauulltt:: -qsourcetype=default
-qstdinc | -qnostdinc
Specifies whether the standard directories are searched for
files included by the #include and #include
"file_name" directives. The -qnostdinc option excludes the
standard include directories from the search path.
DDeeffaauulltt:: -qstdinc
LLaanngguuaaggee eelleemmeenntt ccoonnttrrooll ooppttiioonnss
-qaltivec | -qnoaltivec
Instructs the compiler to support vector data types and
operators and is accepted when the architecture specified by the
-qarch option supports vector instructions
DDeeffaauulltt:: -qnoaltivec
-qasm[=] | -qnoasm
Controls the interpretation of, and subsequent generation of
code for, asm statements.
In (C), can only be ’gcc’.
In (C++), can be:
gcc
Interprets asm statements using GCC syntax.
stdcpp
Interprets asm statements using stdcpp syntax.
DDeeffaauulltt:: -qasm=gcc
-qcpluscmt | -qnocpluscmt
(C) Permits the usage of "//" to introduce a comment that lasts
until the end of the current source line, as in C++.
DDeeffaauulltt::
o -qcpluscmt when the xlc or c99 and related invocations
are used, or when the stdc99 or extc99 language level is in
effect.
o -qnocpluscmt for all other invocation commands and
language levels.
-D[=[]]
Defines as in the #define directive. is an optional
definition or value assigned to . Specifying -D=
(with no ) is equivalent to #define ; specifying
-D is equivalent to #define 1.
-qdbcs | -qnodbcs
Specifies that string literals and comments can contain multi-
byte characters. This is equivalent to -qmbcs.
DDeeffaauulltt:: -qnodbcs
-qdigraph | -qnodigraph
Allows usage of digraph key combinations or keywords to
represent characters not found on some keyboards.
DDeeffaauulltt::
(C) -qdigraph when -qlanglvl is extc89, extended, extc99 or
stdc99, and -qnodigraph otherwise.
(C++) -qdigraph
-qdollar | -qnodollar
Allows the ’$’ symbol to be used in the names of identifiers.
When -qdollar is in effect, the dollar symbol ’$’ in an
identifier is treated as a base character. If the options
-qnodollar and -qlanglvl=ucs are both enabled, the dollar symbol
is treated as an extended character.
DDeeffaauulltt:: -qnodollar
-qignprag=
Instructs the compiler to ignore certain pragma statements. The
options are:
disjoint
Ignores all #pragma disjoint directives in the source file.
isolated_call
Ignores all #pragma isolated_call directives in the source
file.
all
Ignores all #pragma isolated_call directives and #pragma
disjoint directives in the source file.
omp
Ignores all OpenMP parallel processing directives in the
source file.
ibm
(C) Ignores all #pragma ibm snapshot directives in the
source file.
-qkeyword= | -qnokeyword=
Controls whether the specified name is treated as a keyword or
as an identifier whenever it appears in a program source.
By default, all the built-in keywords defined in the C and C++
language standards are reserved as keywords. You cannot add
keywords to the language with this option. However, you can use
-qnokeyword= to disable built-in keywords, and use
-qkeyword= to reinstate those keywords.
(C) This option can also be used with the following C keywords:
restrict, inline, asm and typeof.
(C++) This option can be used with all C++ built-in keywords.
-qlanglvl=
Selects the base C language level for the compilation.
is a colon-separated list of suboptions.
(C) For C language programs, is
{classic|extended|saa|saa12|stdc89|stdc99|extc89|extc99}:
{ucs|noucs}.
classic
Allows the compilation of non-stdc89 programs, and conforms
closely to the K&R level preprocessor.
extended
Provides compatibility with the RT compiler and classic.
This language level is based on C89.
saa
Compilation conforms to the current SAA C CPI language
definition. This is currently SAA C Level 2.
saal2
Compilation conforms to the SAA C Level 2 CPI language
definition, with some exceptions.
stdc89
Compilation conforms to the ANSI C89 standard, also known
as ISO C90.
stdc99
Compilation conforms to the ISO C99 standard.
extc89
Compilation conforms to the ANSI C89 standard, and accepts
implementation-specific language extensions.
extc99
Compilation conforms to the ISO C99 standard, and accepts
implementation-specific language extensions.
ucs | noucs
This suboption controls whether Unicode characters are
allowed in identifiers, string literals and character
literals in program source code.
DDeeffaauulltt::
o -qlanglvl=ucs under language levels stdc99 and extc99.
o -qlanglvl=noucs for all other language levels.
(C++) The suboptions for C++ language programs are:
extended
Compilation is based on strict98, with some differences to
accommodate extended language features.
extended0x
Compilation is based on the the C++0x standard, invoking
all the C++ and currently-supported C++0x features that are
implemented in this release.
NNoottee:: C++0x is a new version of the standard for the C++
programming language. This is a draft standard and has not
been officially adopted in its entirety. Note that future
levels of support for this standard are likely to change.
The implementation of this language level is based on IBM’s
interpretation of the draft C++0x standard, and is subject
to change at any time without notice. IBM makes no attempt
to maintain compatibility with earlier releases, in source
or binary, of the new C++0x -qlanglvl suboptions (their
names or their semantics)and therefore they should not be
relied on as a stable programming interface.
anonstruct | noanonstruct
This suboption controls whether anonymous structs and
anonymous classes are allowed in your C++ source. By
default, the compiler allows anonymous structs.
anonunion | noanonunion
This suboption controls what members are allowed in
anonymous unions. When this suboption is set to anonunion,
anonymous unions can have members of all types that
standard C++ allows in non-anonymous unions.
ansifor | noansifor
This suboption controls whether scope rules defined in the
C++ standard apply to names declared in for-init
statements. By default, standard C++ rules are used.
ansisinit | noansisinit
This suboption can be used to select between old (v3.6 or
earlier) and current (v5.0 or later) compiler object
compatibility.
autotypededuction | noautotypededuction
Controls whether the auto type deduction feature is
enabled. It can be used to delegate the task of type
deduction of an auto variable to the compiler from the type
of its initializer expression.
DDeeffaauulltt:: -qlanglvl=noautotypededuction
c99__func__ | noc99__func__
This suboption instructs the compiler to recognize the C99
__func__ identifier.
The c99__func__ suboption is enabled by default when
-qlanglvl=extended is enabled. It can be enabled for any
language level by specifying -qlanglvl=c99__func__, or
disabled by specifying -qlanglvl=noc99__func__.
c99complex | noc99complex
This suboption instructs the compiler to recognize C99
complex data types and related keywords. It is set by
default for -qlanglvl=extended.
c99compoundliteral | noc99compoundliteral
This suboption instructs the compiler to support the C99
compound literal feature. It is set by default for
-qlanglvl=extended.
c99hexfloat | noc99hexfloat
This suboption enables support for C99-style hexadecimal
floating constants in C++ applications. It is on by default
for -qlanglvl=extended.
c99longlong | noc99longlong
Controls whether the C99 long long feature is enabled. When
you specify the -qlanglvl=c99longlong option, the C++
compiler provides the C99 long long feature, which improves
source compatibility between the C and C++ languages.
DDeeffaauulltt:: -qlanglvl=noc99longlong
c99preprocessor | noc99preprocessor
Controls whether the C99 preprocessor features adopted in
C++0x are enabled. When -qlanglvl=c99preprocessor is in
effect, the C99 and C++0x compilers provide a more common
preprocessor interface, which can ease porting C source
files to the C++ compiler and avoid preprocessor
compatibility issues.
DDeeffaauulltt:: -qlanglvl=noc99preprocessor
c99vla | noc99vla
When c99vla is enabled, the compiler will support the use
of C99-type variable length arrays in your C++
applications. It is set by default for -qlanglvl=extended.
decltype | nodecltype
Controls whether the decltype feature is enabled. It can be
used to get a type that is based on the resultant type of a
possibly type-dependent expression.
DDeeffaauulltt:: -qlanglvl=nodecltype
delegatingctors | nodelegatingctors
Controls whether the delegating constructors feature is
enabled. It can be used to concentrate common
initializations in one constructor.
DDeeffaauulltt:: -qlanglvl=nodelegatingctors
dependentbaselookup | nodependentbaselookup
Provides the ability to specify compilation in conformance
with issue 213 of TC1 of the C++ standard.
DDeeffaauulltt:: -qlanglvl=dependentbaselookup
empty_struct | noempty_struct
instructs the compiler to tolerate empty member
declarations in structs. Empty member declaration in
structs is not allowed.
DDeeffaauulltt:: -qlanglvl=noemptystruct
extendedfriend | noextendedfriend
Controls whether the extended friend declarations feature
is enabled. It can be used to accept additional forms of
non-function friend declarations.
DDeeffaauulltt:: -qlanglvl=noextendedfriend
extendedintegersafe | noextendedintegersafe
With this option, if a decimal integer literal that does
not have a suffix containing u or U cannot be represented
by the long long int type, you can decide whether to use
the unsigned long long int type to represent the literal.
This option takes effect only when the
-qlanglvl=c99longlong option is specified.
DDeeffaauulltt:: -qlanglvl=noextendedintegersafe
externtemplate | noexterntemplate
Controls whether explicit instantiation declarations are
used. Explicit instantiation declarations provides you with
the ability to suppress implicit instantiations of template
specializations or or its members. When
-qlanglvl=externtemplate is in effect, explicit
instantiation declarations are supported.
DDeeffaauulltt:: -qlanglvl=externtemplate
FileScopeConstExternLinkage | noFileScopeConstExternLinkage
Controls whether the file scope of constant variables have
internal or external linkage when the static or extern
keyword is not specified.
DDeeffaauulltt:: -qlanglvl=noFileScopeConstExternLinkage
gnu_assert | nognu_assert
Enables or disables support for the following GNU C system
identification assertions: ’#assert’, ’#unassert’, ’#cpu’,
’#machine’, ’#system’.
gnu_complex | nognu_complex
This suboption instructs the compiler to recognize GNU
complex data types and related keywords.
gnu_computedgoto | nognu_computedgoto
Enables support for computed gotos. This suboption is
enabled for -qlanglvl=extended.
gnu_externtemplate | nognu_externtemplate
This suboption is an alias for [no]externtemplate.
DDeeffaauulltt::
gnu_externtemplate is enabled by default when compiling
to the extended language level.
NNoottee::
With C++0x, the suboptions
-qlanglvl=[no]gnu_externtemplate is deprecated in IBM XL
C/C++ for AIX/LINUX, V11.1, you can use the suboption
-qlanglvl=[no]externtemplate instead.
gnu_include_next | nognu_include_next
Enables or disables support for the GNU C #include_next
preprocessor directive.
DDeeffaauulltt::
gnu_include_next is enabled by default for
-qlanglvl=extended.
gnu_labelvalue | nognu_labelvalue
Enables or disables support for labels as values.
DDeeffaauulltt::
gnu_labelvalue is enabled by default for
-qlanglvl=extended.
gnu_locallabel | nognu_locallabel
Enables or disables support for locally-declared labels.
gnu_membernamereuse | nognu_membernamereuse
Enables or disables reusing a template name in a member
list as a typedef.
gnu_suffixij | nognu_suffixij
Enables or disables support for GCC style complex numbers.
If gnu_suffixij is specified, a complex number can be ended
with suffix i/I or j/J.
DDeeffaauulltt::
gnu_suffixij is enabled by default for
-qlanglvl=extended.
gnu_varargmacros | nognu_varargmacros
This option is similar to -qlanglvl=varargmacros. For the
list of the main differences, refer to the Compiler
Reference.
DDeeffaauulltt::
gnu_varargmacros is set by default for
-qlanglvl=extended.
gnu_warning | nognu_warning
Enables or disables support for the GNU C #warning
preprocessor directive.
illptom | noillptom
This suboption controls what expressions can be used to
form pointers to members. C/C++ can accept some forms that
are in common use, but do not conform to the C++ standard.
The compiler allows these forms by default.
implicitint | noimplicitint
This suboption controls whether the compiler will accept
missing or partially specified types as implicitly
specifying ’int’. This is no longer accepted in the
standard but may exist in legacy code.
With the suboption set to noimplicitint, all types must be
fully specified.
With the suboption set to implicitint, a function
declaration at namespace scope or in a member list will
implicitly be declared to return int.
inlinenamespace | noinlinenamespace
Controls whether the inline namespace definitions feature
is enabled. It can be used to define and specialize members
of an inline namespace as if they were also members of the
enclosing namespace.
DDeeffaauulltt:: -qlanglvl=noinlinenamespace
offsetnonpod | nooffsetnonpod
This suboption controls whether the offsetof macro can be
applied to classes that are not data-only.
By default, the compiler allows offsetof to be used with
non-POD classes.
olddigraph | noolddigraph
This option controls whether old-style digraphs are allowed
in your C++ source. It applies only when -qdigraph is also
set.
By default, the compiler supports only the digraphs
specified in the C++ standard.
oldfriend | nooldfriend
This option controls whether friend declarations that name
classes without elaborated class names are treated as C++
errors.
By default, the compiler lets you declare a friend class
without elaborating the name of the class with the keyword
class.
oldtempacc | nooldtempacc
This suboption controls whether access to a copy
constructor to create a temporary object is always checked,
even if creation of the temporary object is avoided.
By default, the compiler suppresses the access checking.
oldtmplalign | nooldtmplalign
Controls whether alignment rules specified for nested
templates are ignored.
When the default, -qlanglvl=nooldtmplalign, is in effect,
these alignment rules are not ignored.
Specify -qlanglvl=oldtmplalign for compatibility with
VisualAge C++ 4.0 and predecessor products.
oldtmplspec | nooldtmplspec
This suboption controls whether template specializations
that do not conform to the C++ standard are allowed.
By default, the compiler allows these old specializations
(-qlanglvl=nooldtmplspec).
redefmac | noredefmac
Specifies whether a macro can be redefined without a prior
#undef or undefine() statement.
static_assert | nostatic_assert
When -qlanglvl=static_assert is in effect, at compile time,
the compiler issues a server error message if the assertion
fails.
DDeeffaauulltt:: -qlanglvl=nostatic_assert
trailenum | notrailenum
This suboption controls whether trailing commas are allowed
in enum declarations.
By default, the compiler allows one or more trailing commas
at the end of the enumerator list.
typedefclass | notypedefclass
This suboption provides backwards compatibility with
previous versions of VisualAge C++ and predecessor
products.
ucs | noucs
This suboption controls whether Unicode characters are
allowed in identifiers, string literals and character
literals in C++ sources.
DDeeffaauulltt:: -qlanglvl=noucs
varargmacros | novarargmacros
This C99 feature allows the use of a variable argument list
in function-like macros.
variadic[templates] | novariadic[templates]
Controls whether the variadic templates feature is enabled.
It can be used to define class or function templates that
have an arbitrary number of template parameters.
DDeeffaauulltt:: -qlanglvl=novariadic[templates]
zeroextarray | nozeroextarray
This suboption controls whether zero-extent arrays are
allowed as the last non-static data member in a class
definition.
By default, the compiler allows arrays with zero elements.
The default depends on the invocation command used:
Command Default
_____________________________________________
xlC/xlc++ extended
xlc extc99
cc extended
c89 stdc89
c99 stdc99
-qlonglong | -qnolonglong
Allows IBM-style long long integers. This option cannot be used
with -qlanglvl=stdc99 or -qlanglvl=extc99.
DDeeffaauulltt::
o -qlonglong when compiling with xlc, xlc++, xlC or cc
o -qnolonglong when compiling with c89 or c99
-qmbcs | -qnombcs
Specifies that string literals and comments can contain multi-
byte characters. This is equivalent to -qdbcs.
DDeeffaauulltt:: -qnombcs
-qstaticinline | -qnostaticinline
(C++) Controls whether inline functions are treated as static or
extern. Specifying -qnostaticinline means the inline functions
are treated as having extern linkage.
DDeeffaauulltt:: -qnostaticinline
-qtabsize=
Changes the length of tabs as perceived by the compiler, where
is the number of character spaces representing a tab in
the source program.
DDeeffaauulltt:: -qtabsize=8
-qtrigraph | -qnotrigraph
Allows trigraph key combinations to represent characters not
found on some keyboards.
DDeeffaauulltt:: -qtrigraph
-U
Undefines the identifier defined by the compiler or by
the -D option.
-qutf | -qnoutf
Enables recognition of UTF literal syntax.
DDeeffaauulltt:: -qnoutf
TTeemmppllaattee ccoonnttrrooll ooppttiioonnss ((CC++++ oonnllyy))
-qtempinc[=] | -qnotempinc
(C++) Generates separate template include files for template
functions and class declarations, and places these files in a
directory which can be optionally specified.
DDeeffaauulltt:: -qnotempinc
-qtemplatedepth=
(C++) Specifies the maximum number of recursively instantiated
template specializations that will be processed by the compiler.
can be a value between 1 and INT_MAX.
DDeeffaauulltt:: -qtemplatedepth=300
-qtemplaterecompile | -qnotemplaterecompile
(C++) Helps manage dependencies between compilation units that
have been compiled using the -qtemplateregistry compiler option.
DDeeffaauulltt:: -qnotemplaterecompile
-qtemplateregistry[=] | -qnotemplateregistry
(C++) Maintains records of all templates as they are encountered
in the source and ensures that only one instantiation of each
template is made.
DDeeffaauulltt:: -qnotemplateregistry
-qtempmax=
(C++) Specifies the maximum number of template include files to
be generated by the -qtempinc option for each header file.
DDeeffaauulltt:: -qtempmax=1
-qtmplinst=
(C++) Allows you to manage implicit template instantiations.
is one of the following:
none
Instantiates only the inline functions. If this is
specified, -qtempinc and -qtemplateregistry are ignored.
noinline
Suppresses all implicit instantiations.
auto
Handles the implicit instantiations according to the
-qtempinc and -qtemplateregistry options. If both options
are off, then implicit instantiations are always performed.
always
Always perform implicit instantiations. This will ignore
the -qtempinc and -qtemplateregistry options.
DDeeffaauulltt:: -qtmplinst=auto
-qtmplparse=
(C++) Controls whether parsing and semantic checking are applied
to template definition implementations or only to template
instantiations. The compiler has the option to produce warning
or error messages. The suboptions are:
no
Does not parse, to reduce the number of errors issued in
code written for previous versions of the compiler.
warn
Parses template definitions and issues warning messages for
semantic errors.
error
Treats problems in template definitions as errors, even if
the template is not instantiated.
DDeeffaauulltt:: -qtmplparse=no
FFllooaattiinngg--ppooiinntt aanndd iinntteeggeerr ccoonnttrrooll ooppttiioonnss
-qbitfields={signed|unsigned}
Specifies whether bit fields will be signed or unsigned.
DDeeffaauulltt:: -qbitfields=signed
-qchars={signed|unsigned}
Specifies whether the data type char will be signed or unsigned.
DDeeffaauulltt:: -qchars=unsigned
-qenum=
Specifies the amount of storage occupied by enumerations.
Unless it is otherwise specified, signedness is signed if a
signed type of the size chosen can represent all values in the
range of values. The suboptions are:
small
Specifies that enumerations occupy the smallest amount of
space (1, 2, 4, or 8 bytes) that can accurately represent
the range of values in the enumeration. Signedness is
unsigned, unless the range of values includes negative
values.
int
Specifies that enumerations occupy 4 types.
(C)Type is int.
(C++) Type is signed or unsigned int.
intlong
Specifies that enumerations occupy 8 bytes of storage if
the range of values in the enumeration cannot be
represented by one of int or unsigned int. Otherwise, the
enumerations occupy 4 bytes of storage and are represented
by int or unsigned int.
1
Specifies that enumerations occupy 1 byte.
Type is signed or unsigned char.
2
Specifies that enumerations occupy 2 bytes.
Type is signed or unsigned short.
4
Specifies that enumerations occupy 4 bytes.
Type is signed or unsigned int.
8
Specifies that enumerations occupy 8 bytes.
Type is signed or unsigned long long in 32-bit mode, and
signed or unsigned long in 64-bit mode.
DDeeffaauulltt:: -qenum=intlong
-qfloat=
Specifies various floating-point suboptions. This provides
different strategies for speeding up or improving the accuracy
of floating-point calculations. is a colon-
separated list of one or more of the following:
complexgcc | nocomplexgcc
Enables compatibility with GCC passing and returning of
parameters of complex data type.
DDeeffaauulltt::
o complexgcc when compiling in 32-bit mode.
o nocomplexgcc when compiling in 64-bit mode.
fltint | nofltint
Speeds up floating-point-to-integer conversions by using
faster inline code that does not check for overflows.
-qfloat=nofltint checks floating-point-to-integer
conversions for out-of-range values.
If -qarch is set to a processor that has an instruction to
convert from floating point to integer, that instruction
will be used regardless of the [no]fltint setting. This
conversion also applies to all Power processors in 64-bit
mode.
DDeeffaauulltt::
o nofltint at -O2 optimization.
o fltint when -qnostrict or -O3 or higher optimization
level is in effect.
fold | nofold
Specifies that constant floating-point expressions are to
be evaluated at compile time rather than at run time.
DDeeffaauulltt:: fold
hscmplx | nohscmplx
Speeds up operations involving complex division and complex
absolute value. This suboption, which provides a subset of
the optimizations of the hsflt suboption, is preferred for
complex calculations.
DDeeffaauulltt:: nohscmplx
gcclongdouble | nogcclongdouble
Specifies whether the compiler should use GCC-supplied or
IBM-supplied library functions for 128-bit long double
operations. gcclongdouble ensures binary compatibility with
GCC for mathematical calculations but nogcclongdouble
produces better performance. This suboption only has an
effect when 128-bit long double types are enabled with
-qldbl128.
DDeeffaauulltt:: gcclongdouble
hsflt | nohsflt
The hsflt option speeds up calculations by truncating
instead of rounding computed values to single precision
before storing and on conversions from floating-point to
integer. The nohsflt suboption specifies that single-
precision expressions are rounded after expression
evaluation and that floating-point-to-integer conversions
are to be checked for out-of-range values.
DDeeffaauulltt:: nohsflt
maf | nomaf
Makes floating-point calculations faster and more accurate
by using floating-point multiply-add instructions where
appropriate.
DDeeffaauulltt:: maf
nans | nonans
Generates extra instructions to detect signaling NaN when
converting from single-precision to double-precision at run
time. The option nonans specifies that this conversion need
not be detected.
DDeeffaauulltt:: nonans
relax | norelax
Relaxes the strict IEEE-conformance slightly for greater
speed, typically by removing some trivial, floating-point
arithmetic operations, such as adds and subtracts involving
a zero on the right. Specifying -qstrict=noieeefp also
relaxes IEEE conformance.
DDeeffaauulltt:: norelax
rngchk | norngchk
Specifying norngchk instructs the compiler to skip range
checking, allowing for increased performance where division
and sqrt operations are performed repeatedly within a loop.
When rngchk is specified, range checking is performed for
input arguments for software divide and inlined sqrt
operations.
When -qstrict, -qstrict=infinities,
-qstrict=operationprecision, or -qstrict=exceptions is
active, the setting of this option is forced to
-qfloat=rngchk. When -qnostrict is active, the setting of
this option is -qfloat=norngchk unless the -qfloat=rngchk
option is explicitly set by the user.
DDeeffaauulltt:: rngchk
rrm | norrm
Prevents floating-point optimizations that are incompatible
with runtime rounding to plus and minus infinity modes.
DDeeffaauulltt:: norrm
rsqrt | norsqrt
Specifies whether a sequence of code that involves division
by the result of a square root can be replaced by
calculating the reciprocal of the square root and
multiplying. Allowing this replacement produces code that
runs faster. -qfloat=rsqrt has no effect unless -qignerrno
is also specified.
DDeeffaauulltt::
o norsqrt at -O2 optimization
o rsqrt when when -qnostrict or -O3 or higher
optimization level is in effect
spnans | nospnans
Detects signaling NaN on conversion from single-precision
to double-precision.
DDeeffaauulltt:: nospnans
-qldbl128 | -qnoldbl128
Specifies whether to increase the long double size from 64 to
128 bits.
DDeeffaauulltt:: -qldbl128
-qlonglit | -qnolonglit
Makes unsuffixed literals into the long type in 64-bit mode.
DDeeffaauulltt:: -qnolonglit
-y
Specifies the compile-time rounding mode of constant floating-
point expressions.
For binary floating-point types, is one of the
following:
m = round towards minus infinity
n = round to the nearest representable number, ties to even
p = round towards plus infinity
z = round towards zero
DDeeffaauulltt:: -yn
OObbjjeecctt ccooddee ccoonnttrrooll ooppttiioonnss
-q32, -q64
Selects either 32-bit or 64-bit compilation mode. Use the -q32
and -q64 options, along with the -qarch and -qtune compiler
options, to optimize the output of the compiler to the
architecture on which that output will be used.
DDeeffaauulltt:: -q32
-qalloca
(C) Substitutes inline code for calls to function alloca , as if
#pragma alloca directives were in the source code.
-ma (C) Substitutes inline code for calls to function alloca.
-qcommon | -qnocommon
Controls whether uninitialized global variables are allocated in
the common or data section of the object file.
DDeeffaauulltt::
(C) -qcommon
(C++) -qnocommon
-qeh | -qnoeh
(C++) Controls whether exception handling is enabled in the
module being compiled.
DDeeffaauulltt:: -qeh
-qinlglue | -qnoinlglue
This option inlines glue code that optimizes external function
calls when compiling at -q64 and -O2 and higher.
NNoottee::
This option is ignored as glue code is always generated.
DDeeffaauulltt:: -qnoinlglue
-qpic[={small|large}] | -qnopic
Generates position-independent code (pic). Specify -qpic=small
if the Global Offset Table in 32-bit mode or Table of Contents
in 64-bit mode must be 64 Kb or smaller, or -qpic=large if it
can be larger than 64 Kb.
DDeeffaauulltt::
o -qnopic in 32-bit compilation mode
o -qpic=small in 64-bit compilation mode
-qppline | -qnoppline
When used in conjunction with the -E or -P options, enables or
disables the generation of #line directives in the preprocessed
output.
DDeeffaauulltt::
o -qnoppline with -P
o -qppline with -E
-qpriority=
(C++) Specifies the priority level for the initialization of
static objects, where is the initialization priority level
assigned to the static objects within a file, or the priority
level of a shared or non-shared file or library.
You can specify a priority level from 101 (highest priority) to
65535 (lowest priority).
DDeeffaauulltt:: -qpriority=65535
-qproto | -qnoproto
(C) Assumes that all functions are prototyped. Asserts 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.
DDeeffaauulltt:: -qnoproto
-r Produces a relocatable object. This permits the output file to
be produced even though it contains unresolved symbols.
-qreserved_reg=
Indicates that the specified register(s) cannot be used during
the compilation, except as a stack pointer, frame pointer or in
a different fixed role. is a colon-separated
list of registers.
-qro | -qnoro
Specifies the storage type for string literals and puts string
literals in read-only storage.
DDeeffaauulltt::
o -qnoro with cc and its derivatives
o -qro otherwise
-qroconst | -qnoroconst
Specifies the storage location for constant values.
DDeeffaauulltt::
o -qroconst with xlc, xlc++, xlC, c89 and c99 invocations
commands.
o -qnoroconst with cc.
-qrtti | -qnortti
(C++) Generates runtime type identification (RTTI) information
for the typeid and dynamic_cast operators.
DDeeffaauulltt:: -qrtti
-s Strips the symbol table, line number information, and relocation
information from the output file.
-qsaveopt | -qnosaveopt
Saves the command-line options used for compiling a source file,
the user’s configuration file name and the options specified in
the configuration files, the version and level of each compiler
component invoked during compilation, and other information to
the corresponding object file.
This option must be used with the -c option.
DDeeffaauulltt:: -qnosaveopt
-qstatsym | -qnostatsym
Adds user-defined, non-external names that have a persistent
storage class (such as initialized and uninitialized static
variables) to the name list (the symbol table of objects).
DDeeffaauulltt:: -qnostatsym
-qtbtable=
Generates a traceback table that contains information about each
function, including the type of function as well as stack frame
and register information. The traceback table is placed in the
text segment at the end of its code. This option applies only
to 64-bit compilations. It is ignored if specified for a 32-bit
compilation. Suboptions include:
none
No traceback table is generated.
small
A traceback table is generated with no name or parameter
information. This is the default with optimization if -g is
not specified.
full
A full traceback table is generated. This is the default
with -qnoopt or -g specified.
DDeeffaauulltt::
o -qtbtable=full when compiling non-optimized (without -O)
or for debugging (with -g)
o -qtbtable=small otherwise
-qthreaded | -qnothreaded
Ensures that all optimizations will be thread-safe for executing
in a multi-threaded environment.
DDeeffaauulltt::
o -qthreaded when compiling invocation commands ending in
"_r"
o -qnothreaded otherwise.
-qtls[=] | -qnotls
Specifies the thread-local storage model to be used by the
application, where can be:
global-dynamic
This model is the most general, and can be used for all
thread-local variables.
local-dynamic
This model provides better performance than the global-
dynamic model, and can be used for thread-local variables
defined in dynamically-loaded modules.
initial-exec
This model provides better performance than the global-
dynamic or local-dynamic models, and can be used for
thread-local variables defined in dynamically-loaded
modules, provided that those modules are loaded at the same
time as the executable.
local-exec
This model provides the best performance of all of the
models, but can only be used when all thread-local
variables are defined and referenced by the main
executable.
DDeeffaauulltt::
o -qtls=initial_exec if the -qnopic compiler option is
enabled.
o -qtls=global_dynamic if the -qpic compiler option is
enabled.
-qvrsave | -qnovrsave
Enables code in function prologs and epilogs to maintain the
VRSAVE register.
Use -qvrsave to indicate to the compiler that functions in the
compilation unit include code needed to maintain the VRSAVE
register.
Use -qnovrsave to indicate to the compiler that functions in the
compilation unit do not include code needed to maintain the
VRSAVE register.
DDeeffaauulltt:: -qvrsave
-qxcall | -qnoxcall
Generates code to treat static functions within a compilation
unit as if they were external functions.
DDeeffaauulltt:: -qnoxcall
EErrrroorr cchheecckkiinngg aanndd ddeebbuuggggiinngg ooppttiioonnss
-# Traces the compilation and generates information on the progress
of the compilation without invoking the preprocessor, compiler,
or linkage editor.
-qcheck[=] | -qnocheck
Generates code that performs certain types of runtime checking.
If a violation is encountered, a runtime exception is raised by
sending a SIGTRAP signal to the process.
is a colon-separated list of one or more of
the following:
all
Enables all suboptions.
bounds | nobounds
Performs runtime checking of addresses when subscripting
within an object of known size.
divzero | nodivzero
Performs runtime checking of integer division. A trap will
occur if an attempt is made to divide by zero.
nullptr | nonullptr
Performs runtime checking of addresses contained in pointer
variables used to reference storage.
Specifying -qcheck with no suboptions is equivalent to
-qcheck=all.
DDeeffaauulltt:: -qnocheck
-qdbxextra | -qnodbxextra
(C) Specifies that all typedef declarations, struct, union, and
enum type definitions are included for debugging. Use this
option with the -g option to produce additional debugging
information for use with a debugger.
DDeeffaauulltt:: -qnodbxextra
-qflttrap[=] | -qnoflttrap
Generates instructions to detect and trap runtime floating-point
exceptions. is a colon-separated list of one
or more of the following suboptions:
enable
Enables trapping of the specified exceptions.
imprecise
Only checks for the specified exceptions on subprogram
entry and exit.
inexact
Detects floating-point inexact exceptions.
invalid
Detects floating-point invalid operation exceptions.
nanq | nonanq
Generates code to detect and trap NaNQ (Quiet Not-a-Number)
exceptions handled or generated by floating-point
operations.
overflow
Detects floating-point overflow.
underflow
Detects floating-point underflow.
zerodivide
Detects floating-point division by zero.
DDeeffaauulltt:: -qnoflttrap
-qformat= | -qnoformat
Warns of possible problems with string input and output format
specifications. Functions diagnosed are printf, scanf, strftime,
strfmon family functions and functions marked with format
attributes. is a comma-separated list of one or
more of the following suboptions:
all | noall
Turns on all format diagnostic messages.
exarg | noexarg
Warns if excess arguments appear in printf and scanf style
function calls.
nlt | nonlt
Warns if a format string is not a string literal, unless
the format function takes its format arguments as a
va_list.
sec | nosec
Warns of possible security problems in use of format
functions.
y2k | noy2k
Warns of strftime formats that produce a 2-digit year.
zln | nozln
Warns of zero-length formats.
DDeeffaauulltt::
o -qnoformat, which is equivalent to -qformat=noall.
o -qformat=all if -qformat is specified without any
suboptions.
-qfullpath | -qnofullpath
Records the full or absolute path names of source and include
files in object files compiled with debugging information (when
you use the -g option).
DDeeffaauulltt:: -qnofullpath
-g Generates debug information for debugging tools.
-g implies the -qnoinline option.
-qfunctrace[=] | -qnofunctrace
Calls to the tracing routine that traces the entry and exit
points of functions in a compilation unit, or only a specific
list of functions. indicates the named functions
to be traced. This option has the following suboptions:
+
Instructs the compiler to trace function_name, classes, or
namespace, or any of its internal functions.
-
Instructs the compiler not to trace function_name, classes,
or namespace, or any of its internal functions.
classname
Indicates the named class to be traced.
namespace
Indicates the namespace to be traced.
The -qfunctrace+ and -qfunctrace- suboptions enable tracing for
a specific list of functions and are not affected by
-qnofunctrace. The list of functions is cumulative.
DDeeffaauulltt:: -qnofunctrace -qfunctrace-std
-qhalt=
Stops the compiler after the first phase if the severity level
of errors detected equals or exceeds the specified level, .
The severity levels in increasing order of severity are:
i = informational messages
w = warning messages
e = error messages (C only)
s = severe error messages
DDeeffaauulltt:: -qhalt=s
-qhaltonmsg=
(C++) Stops the compiler after the compilation phase where it
encounters the specified message number(s), where
is a comma-separated list of message numbers.
-qinfo[=[][]] | -qnoinfo
Produces or suppresses additional informational messages.
is a colon-separated list. If a is
specified along with a , a colon must separate them.
The suboptions are:
all
Enables all diagnostic messages for all groups.
noall
Disables all diagnostic messages for all groups.
als
Enables reporting of possible violations of the ANSI
aliasing rule in effect.
noals
Disables reporting of possible ANSI aliasing rule
violations.
private
Lists shared variables that are made private to a parallel
loop.
reduction
Lists variables that are recognized as reduction variables
inside a parallel loop.
stp | nostp
Issues warnings for procedures that are not protected
against stack corruption. -qinfo=stp has no effects unless
the -qstackprotect option is also enabled. Like other
-qinfo options, -qinfo=stp is enabled or disabled through
-qinfo=all / noall. -qinfo=nostp is the default option.
turns on or off specific groups of messages and is
a colon-separated list of one or more of the following:
c99 | noc99
(C) C code that might behave differently between C89 and
C99 language levels
cls | nocls
C++ classes
cmp | nocmp
Possible redundancies in unsigned comparisons
cnd | nocnd
Possible redundancies or problems in conditional
expressions
cns | nocns
Operations involving constants
cnv | nocnv
Conversions
dcl | nodcl
Consistency of declarations
eff | noeff
Statements and pragmas with no effect
enu | noenu
Consistency of enum variables
ext | noext
Unused external definitions
gen | nogen
General diagnostic messages
gnr | nognr
Generation of temporary variables
got | nogot
Use of goto statements
ini | noini
Possible problems with initialization
lan | nolan
Language level effects
obs | noobs
Obsolete features
ord | noord
Unspecified order of evaluation
par | nopar
Unused parameters
por | nopor
Non-portable language constructs
ppc | noppc
Possible problems with using the preprocessor
ppt | noppt
Trace of preprocessor actions
pro | nopro
Missing function prototypes
rea | norea
Code that cannot be reached
ret | noret
Consistency of return statements
trd | notrd
Possible truncation or loss of data or precision
tru | notru
Variable names truncated by the compiler
trx | notrx
Rounding of hexadecimal floating-point constants
uni | nouni
Uninitialized variables
use | nouse
(C++) Unused auto and static variables
vft | novft
(C++) Generation of virtual function tables in C++ programs
zea | nozea
Zero-extent arrays
DDeeffaauulltt::
(C) -qnoinfo
(C++) -qinfo=lan:trx
If -qinfo is specified without a suboption, the default is
-qinfo=all for C and -qinfo=all:noppt for C++.
-qinitauto= | -qnoinitauto
Initializes each byte or word of storage for automatic variables
to the specified hexadecimal value . This generates
extra code and should only be used for error determination.
DDeeffaauulltt:: -qnoinitauto
-qkeepparm | -qnokeepparm
Ensures that function parameters are stored on the stack even if
the application is optimized. As a result, parameters remain in
the expected memory location, providing access to the values of
these incoming parameters to tools such as debuggers.
DDeeffaauulltt:: -qnokeepparm
-qlinedebug | -qnolinedebug
Generates only abbreviated line number and source file name
information for the debugger.
DDeeffaauulltt:: -qnolinedebug
-qmaxerr=[:] | -qnomaxerr
Instructs the compiler to halt compilation when the specified
number of errors of the specified severity (by default, the
value of -qhalt) or greater is reached. must be an
integer. The severity levels, , are:
i = informational
w = warning
e = error (C only)
s = severe error
DDeeffaauulltt:: -qnomaxerr
-qoptdebug | -qnooptdebug
When used with high levels of optimization, -qoptdebug produces
source files containing optimized pseudocode that can be read by
a debugger.
An output file with a .optdbg extension is created for each
input file compiled with -qoptdebug. You can use the information
contained in this file to help you understand how your code
actually behaves under optimization.
DDeeffaauulltt:: -qnooptdebug
-qsymtab={unref|static}
(C) Determines what types of information appear in the symbol
table. The suboptions are:
unref
Specifies that all typedef declarations, struct, union, and
enum type definitions are included for processing by the
debugger.
static
Adds user-defined, non-external names that have a
persistent storage class (such as initialized and
uninitialized static variables) to the name list.
DDeeffaauulltt::
The default is to not add static variables to the symbol
table.
-qsyntaxonly
(C) Performs syntax checking without generating an object file.
DDeeffaauulltt::
By default, source files are compiled and linked to
generate an executable file.
-qwarn0x | -qnowarn0x
Enables or disables checking for differences in programs caused
by the migration from C++98 to C++0x standard.
DDeeffaauulltt:: -qnowarn0x
NNoottee:: This option is only in effect when the C++ language level
is set to extended0x.
-qwarn64 | -qnowarn64
Enables checking for possible data conversion problems between
32-bit and 64-bit compiler modes.
DDeeffaauulltt:: -qnowarn64
LLiissttiinngg aanndd mmeessssaaggeess ooppttiioonnss
-qattr[=full] | -qnoattr
Produces a compiler listing that includes an attribute listing
for all identifiers. If -qattr is specified, the listing
contains only those identifiers that are used. If -qattr=full is
specified, the listing contains all names. If -qnoattr is
specified, no listing is produced.
DDeeffaauulltt:: -qnoattr
-qdump_class_hierarchy
(C++) For each class object, this option dumps a representation
of its hierarchy and virtual function table layout to a file.
The file name is created by appending ".class" to the source
file name.
-qflag=:
Defines the minimum severity level of diagnostic messages to be
written to the listing file and to the user terminal.
is the minimum level for the listing file,
and is the minimum level for the terminal.
The message severity levels are:
i = informational messages
w = warning messages
e = error, severe error and unrecoverable error messages (C
only)
s = severe error and unrecoverable error messages (C)
s = severe error messages (C++)
DDeeffaauulltt:: -qflag=i:i
-qlist[={offset|nooffset}] | -qnolist
Produces a compiler listing that includes an object listing. You
can use the object listing to help understand the performance
characteristics of the generated code and to diagnose execution
problems.
offset | nooffset
Changes the offset of the PDEF header from 00000 to the
offset of the start of the text area.
Specifying -qlist without the suboption is equivalent to
list=nooffset.
DDeeffaauulltt:: -qnolist
-qlistfmt=
Creates a report to assist with finding optimization
opportunities. is a colon-separated list of
the following options:
xml
Indicates that the report should be generated in XML
format.
contentSelectionList
Provides a filter to limit the type and quantity of
information in the report. is a
colon-separated list of any of the following suboptions:
data | nodata
Produces information about data reorganizations.
inlines | noinlines
Produces inlining information.
pdf | nopdf
Produce profile-directed feedback information.
transforms | notransforms
Produces information about loop transformations.
all
Produces all available report information.
none
filename
Specifies the name of the report file. One file is produced
during the compile phase, and one file is produced during
the IPA link phase. If no filename is specified, a file
with the suffix .xml is generated in a way that is
consistent with the rules of name generation for the given
platform.
stylesheet
Specifies the name of an existing XML stylesheet for which
an xml-stylesheet directive is embedded in the resulting
report. The default behavior is to not include a
stylesheet. The stylesheet shipped with XL Fortran is
xlstyle.xsl. This stylesheet renders the XML to an easily
read format when viewed using a browser that supports XSLT.
version
Specifies the version name of the report to be generated.
If you have written a tool that requires a certain version
of this report, you need to specify the version.
When used with an option that enables inlining such as -qinline,
the report shows which functions were inlined and why others
were not inlined.
To generate a loop transformation listing, you must also specify
one of the following options on the command line:
o -qsimd=auto
o -qsmp
o -O5
o -qipa=level=2
To generate a parallel transformation listing or parallel
performance messages, you must also specify one of the following
options on the command line:
o -qsmp
o -O5
o -qipa=level=2
When used with the option that enables profiling, -qpdf, the
report contains information about call and block counts and
cache misses.
When used with an option that produces data reorganizations such
as -qipa=level=2, the report contains information about those
reorganizations.
DDeeffaauulltt:: This option is not on by default. If no
options are selected in their positive
form, no report is produced. The default is -qlistfmt=xml=none.
-qlistopt | -qnolistopt
Produces a compiler listing that displays all the options that
were in effect when the compiler was invoked.
DDeeffaauulltt:: -qnolistopt
-qphsinfo | -qnophsinfo
Reports the time taken in each compilation phase. Phase
information is sent to standard output. The output takes the
form / for each phase where
represents the CPU time used by the compiler and
represents the total of the compiler time and the time that the
CPU spends handling system calls.
DDeeffaauulltt:: -qnophsinfo
-qprint | -qnoprint
Enables or suppresses listings. Specifying -qnoprint overrides
all listing-producing options, regardless of where they are
specified, to suppress listings.
DDeeffaauulltt:: -qprint
-qreport | -qnoreport
Instructs the compiler to produce transformation reports that
show how program loops are optimized. The compiler also reports
the number of streams created for a given loop. The
transformation reports are included as part of the compiler
listing. This option requires -qhot or -qsmp in order to have
effect.
A listing file is generated with a .lst suffix for each source
file named on the command line.
To generate data reorganization information, specify the
optimization level -qipa=level=2 or -O5 together with -qreport.
To generate information about data prefetch insertion locations,
use the optimization level of -qhot, or any other option that
implies -qhot together with -qreport.
DDeeffaauulltt:: -qnoreport
-qshowinc[=] | -qnoshowinc
Used with -qsource to selectively show user header files
(includes using " ") or system header files (includes using < >)
in the program source listing. is a colon-separated
list of one or more of the following types:
usr | nousr
Specifies whether to show user include files.
sys | nosys
Specifies whether to show system include files.
all
Shows both user and system include files.
DDeeffaauulltt:: -qnoshowinc
-qskipsrc={show | hide}
Used with -qsource to determine whether the source statements
skipped by the compiler are shown in the source section of the
listing file.
show | hide
When show is in effect, the compiler will display all
source statements in the listing. This will result in both
true and false paths of the preprocessing directives to be
shown.
DDeeffaauulltt:: -qskipsrc=show
-qsource | -qnosource
Produces a compiler listing that includes source code.
DDeeffaauulltt:: -qnosource
-qsrcmsg | -qnosrcmsg
(C) Adds the corresponding source code lines to the diagnostic
messages in the stderr file.
DDeeffaauulltt:: -qnosrcmsg
-qstackprotect[={all | size=N}] | -qnostackproteck
Provides protection against malicious code or programming errors
that overwrite or corrupt the stack. The suboptions are:
all
Protects all procedures whether or not there are vulnerable
objects. This option is not set by default.
size=N
Protects all procedures containing automatic objects
greater or equal to N bytes in size. The default size is 8
when -qstackprotect is enabled.
NNoottee::
o This option cannot be used with #pragma options.
o This feature can only be utilized on Linux with GLIBC 2.4
and up (Machines with GCC 4.X and up).
DDeeffaauulltt:: -qnostackprotect
-qsuppress= | -qnosuppress
Prevents the specified compiler or driver informational or
warning messages from being displayed or added to the listings,
where is a colon-separated list of message numbers that
will not be displayed.
DDeeffaauulltt:: -qnosuppress
-v Instructs the compiler to report information on the progress of
the compilation, and names the programs being invoked within the
compiler and the options being specified to each program.
Information is displayed in a comma-separated list.
-V Instructs the compiler to report information on the progress of
the compilation, and names the programs being invoked within the
compiler and the options being specified to each program.
Information is displayed in a space-separated list.
-qversion[=verbose]
Displays the official compiler product name and the compiler
version found on the system.
verbose
Additionally displays information about the version,
release, and level of each compiler component installed.
-w Suppresses informational, language-level and warning messages.
Specifying this option is equivalent to specifying -qflag=e:e in
C or -qflag=s:s in C++.
-qxref[=full] | -qnoxref
Specifies whether to produce a compiler listing that includes a
cross-reference listing of all identifiers.
Specifying -qxref will report only identifiers that are used,
-qxref=full reports all identifiers in the program, and -qnoxref
does not report any identifiers in the program. The -qnoprint
option overrides this option.
DDeeffaauulltt:: -qnoxref
OOppttiimmiizzaattiioonn aanndd ttuunniinngg ooppttiioonnss
-qaggrcopy={overlap|nooverlap}
Enables destructive copy operations for structures and unions.
overlap | nooverlap
Enables or disables optimizations for structure and union
assignments. nooverlap assumes that the source and
destination for structure and union assignments do not
overlap, allowing the compiler to generate faster code.
overlap inhibits these optimizations.
DDeeffaauulltt:: -qaggrcopy=nooverlap
-qalias=
Specifies the aliasing assertions to be applied to your
compilation unit. is a colon-separated list of
the following options:
addrtaken | noaddrtaken
Variables are disjoint from pointers unless their address
is taken.
allptrs | noallptrs
Pointers are never aliased if allptrs is specified, but may
be aliased if noallptrs is specified. -qalias=allptrs
implies -qalias=typeptr.
ansi | noansi
If ansi is specified, type-based aliasing is used during
optimization, which restricts the lvalues that can be
safely used to access a data object. This option has no
effect unless you also specify the -O option.
Specifying -qalias=noansi turns off type-based aliasing
completely.
global | noglobal
When global is in effect, type-based aliasing rules are
enabled during IPA link-time optimization across
compilation units. Both -qipa and -qalias=ansi must be
enabled for -qalias=global to have an effect.
Specifying noglobal disables type-based aliasing rules
across compilation units.
restrict | norestrict
When restrict is in effect, optimizations for pointers
qualified with the restrict keyword are enabled. Specifying
norestrict disables optimizations for restrict-qualified
pointers.
-qalias=restrict is independent from other -qalias
suboptions.
typeptr | notypeptr
Pointers to different types are never aliased if typeptr is
specified, but may be aliased if notypeptr is specified.
DDeeffaauulltt::
(C++) -qalias=noaddrtaken:noallptrs:ansi:global:
restrict:notypeptr
(C) -qalias=noaddrtaken:noallptrs:ansi:global:
restrict:notypeptr for all invocation commands
except cc.
-qalias=noaddrtaken:noallptrs:noansi:global:
restrict:notypeptr for the cc invocation command.
-qarch=
Specifies the general processor architecture for which the code
(instructions) should be generated. In general, the -qarch
option allows you to target a specific architecture for the
compilation. For any given -qarch setting, the compiler
defaults to a specific, matching -qtune setting, which can
provide additional performance improvements. The suboptions
are:
auto
Automatically detects the specific architecture of the
compiling machine. It assumes that the execution
environment will be the same as the compilation
environment.
403
Produces object code containing instructions that will run
on the PowerPC 403 hardware platform.
pwr3
Produces an object that contains instructions that run on
the POWER3 and POWER3 compatible hardware platforms.
pwr4
Produces an object that contains instructions that run on
the POWER4 and POWER4 compatible hardware platforms.
pwr5
Produces an object that contains instructions that run on
the POWER5 and POWER5 compatible hardware platforms.
pwr5x
Produces an object that contains instructions that run on
the POWER5+ and POWER5+ compatible hardware platforms.
pwr6
Produces object code containing instructions that will run
on the POWER6 or POWER6 compatible hardware platforms
running in POWER6 or POWER6 compatible architected mode.
pwr6e
Produces object code containing instructions that will run
on the POWER6 hardware platforms running in POWER6 raw
mode.
pwr7
Produces object code containing instructions that will run
on the POWER7 hardware platforms.
ppc
Produces an object that contains instructions that run on
any of the 32-bit Power hardware platforms. Using -q64
with ppc upgrades the architecture to ppc64.
ppc64
Produces object code that will run on any 64-bit Power
hardware platform. When compiled in 32-bit mode, the
resulting object code may include instructions that are not
recognized or behave differently when run on 32-bit Power
platforms.
ppcgr
In 32-bit mode, produces object code containing optional
graphics instructions for Power hardware platforms.
In 64-bit mode, produces object code containing optional
graphics instructions that will run on 64-bit Power
platforms, but not on 32-bit-only platforms. Using -q64
with ppcgr upgrades the architecture to ppc64gr.
ppc64gr
Produces object code that will run on any 64-bit Power
hardware platform that supports the optional graphics
instructions.
ppc64grsq
Produces object code that will run on any 64-bit Power
hardware platform that supports the optional graphics and
square root instructions.
ppc64v
Produces object code that will run on any 64-bit Power
hardware platform that supports the optional vector
instructions, such as a PowerPC 970.
ppc970
Generates instructions specific to PowerPC 970 processors.
rs64b
Produces an object that contains instructions that run on
an RS64II hardware platform.
rs64c
Produces an object that contains instructions that run on
an RS64III hardware platform.
DDeeffaauulltt:: -qarch=ppc64grsq
-qassert=
Provides information about the program to help fine-tune
optimizations. Suboptions include:
refalign | norefalign
Specifies that all pointers inside the compilation unit only
point to data that is naturally aligned according to the length
of the pointer types.
DDeeffaauulltt:: -qassert=norefalign
-qcache=
Describes the cache configuration for a specific target
execution machine, where is a colon-separated
list of one or more of the following suboptions:
assoc=
Specifies the set associativity of the cache, where
is one of the following:
0 Direct-mapped cache
1 Fully associative cache
(n > 1) n-way set associative cache
auto
Automatically detects the specific cache configuration of
the compiling machine. It assumes that the execution
environment will be the same as the compilation
environment.
cost=
Specifies the performance penalty, in CPU cycles, resulting
from a cache miss.
level=
Specifies which level of cache is affected, where level is
one of the following:
1 Basic cache
2 Level-2 cache
3 Table Lookaside Buffer (TLB)
If a machine has more than one level of cache, use a
separate -qcache option.
line=
Specifies the line size of the cache.
size=
Specifies the total size of the cache.
type=
The settings apply to the specified type of cache, where
is one of the following:
c = Combined data and instruction cache
d = Data cache
i = Instruction cache
DDeeffaauulltt::
The -qtune setting determines the optimal default -qcache
settings for most typical compilations. -O4, -O5, or -qipa
must be specified with the -qcache option.
-qcompact | -qnocompact
Reduces code size where possible, at the expense of execution
speed. Code size is reduced by inhibiting optimizations that
replicate or expand code inline. This option takes effect only
if -O2 or higher is also used.
DDeeffaauulltt:: -qnocompact
-qdataimported[=]
Specifies variables that the compiler can assume are imported.
is a colon-separated list of variables.
Specifying -qdataimported without instructs the
compiler to assume that all variables are imported. This is
equivalent to specifying -qnotocdata.
(C++) Variable names must be specified using their mangled
names.
This option applies only to 64-bit compilations.
-qdatalocal[=]
Specifies variables that the compiler can assume are local.
is a colon-separated list of variables.
Specifying -qdatalocal with no variables instructs the compiler
to assume that all variables are local. This is equivalent to
specifying -qtocdata.
(C++) Variable names must be specified using their mangled
names.
-qtocdata | -qnotocdata
Marks all data as local. This option applies only to 64-bit
compilations, and is ignored if specified for a 32-bit
compilation.
DDeeffaauulltt:: -qnotocdata (marks all data as imported)
-qdirectstorage | -qnodirectstorage
Informs the compiler that write-through-enabled or cache-
inhibited storage may be referenced.
DDeeffaauulltt:: -qnodirectstorage
-qfdpr | -qnofdpr
Collects information about programs for use with the IBM
Feedback Directed Program Restructuring (FDPR) performance-
tuning utility.
DDeeffaauulltt:: -qnofdpr
-qhot[=] | -qnohot
Specifies whether or not to perform high-order transformations
during optimization. The suboptions are:
arraypad[=] | noarraypad
When is specified, the compiler will pad every
array in the code. The pad amount must be a positive
integer value. Otherwise, the compiler will pad any arrays
where it infers that there may be a benefit.
level={0|1|2}
Specifies the level of high-order transformation to perform
during compilation.
0
The compiler performs a subset of the high-order
transformations. Some of these include early
distribution, loop interchange, and loop tiling, as
examples. Optimization level -O3 implies
-qhot=level=0.
1
At level=1, full high-order transformation is
performed. -qhot=level=1 is equivalent to -qhot and
the compiler options that imply -qhot also imply
-qhot=level=1, unless -qhot=level=0 is explicitly
specified.
2
The compiler performs the default set of high-order
transformations and some more aggressive loop
transformations. -qhot=level=2 must be used with
-qsmp.
simd | nosimd
This suboption has been deprecated. Use the -qsimd compiler
option.
vector | novector
When specified with -qnostrict and -qignerrno, or an
optimization level of -O3 or higher (otherwise -qhot=vector
has no effect), the compiler converts certain operations in
a loop that apply to successive elements of an array into a
call to a routine in the Mathematical Acceleration
Subsystem (MASS) library, part of the libxlopt.a library.
If you specify -qhot=novector, the compiler performs
optimizations on loops and arrays, but avoids replacing
certain code with calls to vector library routines.
fastmath | nofastmath
Tunes your application to either use fast scalar versions
of math functions or use the default versions.
You must use this suboption together with -qignerrno,
unless -qignerrno is already enabled by other options.
-qhot=fastmath enables the replacement of math routines
with available math routines from the XLOPT library only if
-qstrict=nolibrary is enabled. -qhot=fastmath is enabled by
default if -qhot is specified regardless of the hot level.
DDeeffaauulltt::
o -qnohot
o -qhot=noarraypad:level=0:novector:fastmath
when -O3 is in effect.
o -qhot=noarraypad:level=1:vector:fastmath when -qsmp,
-O4 or -O5 is in effect.
-qignerrno | -qnoignerrno
Allows the compiler to perform optimizations that assume errno
is not modified by system calls.
DDeeffaauulltt:: -qnoignerrno
-qipa[=] | -qnoipa
Turns on or customizes a class of optimizations known as
interprocedural analysis (IPA). is a colon-
separated list of the following suboptions:
exits=
Specifies names of functions which represent program exits.
is a comma-separated list of function
names.
infrequentlabel=
Specifies a comma-separated list of user-defined labels
that are likely to be called infrequently during a program
run.
isolated=
Specifies a comma-separated list of functions that are not
compiled with -qipa and do not directly refer to any global
variable.
level=
Determines the amount of IPA analysis and optimization
performed, where can be equal to:
0
Performs only minimal interprocedural analysis and
optimization.
1
Turns on inlining, limited alias analysis, and limited
call-site tailoring.
2
Full interprocedural data flow and alias analysis.
To generate data reorganization information, specify
the optimization level -qipa=level=2 or -O5 together
with -qreport.
DDeeffaauulltt:: 1
list[={|short|long}]
Specifies an output listing file name during the link
phase. The default name is "a.lst". Specifying ’long’ or
’short’ can be used to request more or less information in
the listing file to determine which listing sections will
be included.
DDeeffaauulltt:: short
lowfreq=
Specifies a comma-separated list of functions that are
likely to be called infrequently during the course of a
typical program run.
missing={unknown|safe|isolated|pure}
Specifies the default assumption for functions not compiled
with -qipa.
unknown
Greatly restricts the amount of interprocedural
optimization for calls to unknown functions.
safe
Functions which do not indirectly call a visible (not
missing) function either through direct call or
function pointer.
isolated
Functions which do not directly reference global
variables accessible to visible functions.
pure
Functions which are safe and isolated and which do not
indirectly alter storage accessible to functions.
DDeeffaauulltt:: missing=unknown
object | noobject
Specifies whether to include standard object code in the
object files. Specifying ’noobject’ can substantially
reduce overall compile time by not generating object code
during the first IPA phase.
partition={small|medium|large}
Specifies the size of program sections that are analyzed
together. Larger partitions may produce better analysis but
require more storage.
DDeeffaauulltt:: partition=medium
pure=
Specifies a comma-separated list of functions not compiled
with -qipa and that are "isolated", "safe", and do not
modify any data objects that are visible to the caller.
safe=
Specifies a comma-separated list of functions not compiled with
-qipa and that do not call any other part of the program.
threads[=] | nothreads
Runs portions of the IPA optimization process during pass 2 in
parallel threads, which can speed up the linking process on
multi-processor systems. can be one of the
following:
auto | noauto
When auto is in effect, the compiler selects a number of
threads heuristically based on machine load. When noauto is
in effect, the compiler spawns one thread per machine
processor.
Instructs the compiler to use a specific number of threads.
can be any integer value in the range of 1 to
32767. However, is effectively limited to the
number of processors available on your system.
Specifying threads with no suboptions implies threads=auto.
DDeeffaauulltt:: -qipa=threads
unknown=
Specifies a comma-separated list of functions that are not
compiled with -qipa and that may update global variables and
dummy arguments and call other parts of the program compiled
with -qipa.
Specifies the name of a file that contains suboption information
in a special format.
Regular expressions are supported when specifying function names for
these suboptions:
exits, isolated, lowfreq, pure, safe, unknown.
(C++) Function names must be specified using their mangled names.
DDeeffaauulltt::
o -qnoipa
o -qipa=level=1:missing=unknown:
partition=medium:threads=auto when -O4 is in
effect.
o -qipa=level=2:missing=unknown:
partition=medium:threads=auto when -O5 is in
effect.
o -qipa=level=0:missing=unknown:
partition=medium:threads=auto when -qpdf1 or
-qpdf2 is in effect.
-qisolated_call=
Informs the compiler that specific functions do not have or rely
on side effects, other than those implied by their parameters.
is a colon-separated list of function names.
-qlibansi | -qnolibansi
Assumes that all functions with the name of an ANSI C defined
library function are, in fact, the library functions.
DDeeffaauulltt:: -qnolibansi
-qlibmpi | -qnolibmpi
Asserts that all functions with Message Passing Interface (MPI)
names are in fact MPI functions and not a user function with
different semantics. -qlibmpi allows the compiler to generate
better code because it knows about the behavior of a given
function, such as whether or not it has any side effects.
DDeeffaauulltt:: -qnolibmpi
-qmaxmem=
Limits the amount of memory used by certain memory-intensive
optimizations to kilobytes. When is -1, the
optimizer will use as much memory as needed.
DDeeffaauulltt::
o -qmaxmem=8192 when -O2 level optimization is set.
o -qmaxmem=-1 when -O3 level or greater optimization is
set.
-qminimaltoc | -qnominimaltoc
Avoids Table of Contents (TOC) overflow conditions by placing
TOC entries into a separate data section for each object file.
By default, the compiler will allocate at least one TOC entry
for each unique non-automatic variable reference in your
program.
DDeeffaauulltt:: -qnominimaltoc
-O[]
Optimizes code at a choice of levels during compilation. This is
equivalent to -qoptimize[=]. can be:
0
Performs only quick local optimizations such as constant
folding and elimination of local common subexpressions.
2
Performs optimizations that the compiler developers
considered the best combination for compilation speed and
runtime performance. The optimizations may change from
product release to release.
3
Performs 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 program. The compiler guards against these
optimizations at -O2 and the option -qstrict is provided at
-O3 to turn off these aggressive optimizations.
Specifying -O3 implies -qhot=level=0.
4
This option is the same as -O3, but also:
o sets the -qarch and -qtune options to the architecture
of the compiling machine.
o sets the -qcache option most appropriate to the
characteristics of the compiling machine.
o sets the -qipa option.
o sets the -qhot option to level=1.
5
Equivalent to -O4 -qipa=level=2.
Specifying -O with no is equivalent to specifying -O2.
DDeeffaauulltt:: -O0
-qoptimize[=] | -qnooptimize
The long form of the -O option. -qoptimize= is equivalent
to -O. See the -O option.
DDeeffaauulltt:: -qnooptimize
-p, -pg, -qprofile={-p|-pg}
Sets up the object files produced by the compiler for profiling.
-pg is like -p, but it produces more extensive statistics.
-qpdf1[=] | -qnopdf1
Tunes optimizations through profile-directed feedback (PDF),
where results from sample program execution are used to improve
optimization near conditional branches and in frequently
executed code sections.
Used with a minimum optimization level of -O2, -qpdf1 produces
an object that is instrumented to collect runtime execution
information. This is phase 1 of the profile-directed feedback
optimization process.
You can use old profiling information at the second stage of the
PDF process after you modify your source file. You can also use
different compiler options to run both stages of the PDF
process, compiler will only issue a list of warning messages but
will not terminate. However, you are strongly discouraged from
using different compiler options between two stages of PDF.
Because doing so will not yield any benefits of using PDF.
is a colon-separated list of the following
suboptions:
pdfname=
Specifies the location and name of the profile data file
containing the PDF profiling information.
DDeeffaauulltt::
If you do not specify , the default file name
is ._pdf and the file is saved in the current working
directory, or in the directory named by the PDFDIR
environment variable, if it is set.
level = 0 | 1 | 2
Supports multiple-pass profiling, cache miss, block
counter, call counter and extended value profiling. You can
compile your application with -qpdf1=level=0|1|2 to
generate profiling data with different levels of
optimization. The following is a list of detailed
descriptions for each level of optimization:
o 0 is the basic compiler instrumentation which
generates lower overhead than -qpdf1=level=1.
o 1 is the default compiler instrumentation which is
equivalent to -qpdf1 in previous releases.
o 2 is a more aggressive compiler instrumentation which
supports multiple pass profiling. This suboption is
supported at all PDF optimization levels.
exename
Generates the name of the PDF file based on what you
specify with the -o option. You can use this suboption with
-qpdf1.
defname
Reverts the PDF file to its default file name. You can use
this suboption with -qpdf1.
DDeeffaauulltt:: -qnopdf1
-qpdf2[=] | -qnopdf2
Tunes optimizations through profile-directed feedback (PDF),
where results from sample program execution are used to improve
optimization near conditional branches and in frequently
executed code sections.
Used with a minimum optimization level of -O2, -qpdf2 tunes
application performance using the data generated by running a
program compiled with -qpdf1. This is phase 2 of the profile-
directed feedback optimization process.
You can use old profiling information at the second stage of the
PDF process after you modify your source file. You can also use
different compiler options to run both stages of the PDF
process, compiler will only issue a list of warning messages but
will not terminate. However, you are strongly discouraged from
using different compiler options between two stages of PDF.
Because doing so will not yield any benefits of using PDF.
pdfname=
Specifies the location and name of the profile data file
containing the PDF profiling information.
DDeeffaauulltt::
If you do not specify , the default file name
is ._pdf and the file is saved in the current working
directory, or in the directory named by the PDFDIR
environment variable, if it is set.
level = 0 | 1 | 2
Supports multiple-pass profiling, cache miss, block
counter, call counter and extended value profiling. You can
compile your application with -qpdf2=level=0|1|2 to
generate profiling data with different levels of
optimization. The following is a list of detailed
descriptions for each level of optimization:
o 0 is the basic compiler instrumentation which
generates lower overhead than -qpdf2=level=1.
o 1 is the default compiler instrumentation which is
equivalent to -qpdf2 in previous releases.
o 2 is a more aggressive compiler instrumentation which
supports multiple pass profiling. This suboption is
supported at all PDF optimization levels.
exename
Generates the name of the PDF file based on what you
specify with the -o option.
defname
Reverts the PDF file to its default file name. You can use
this suboption with -qpdf2.
DDeeffaauulltt:: -qnopdf2
-qprefetch [=] | -qnoprefetch
Enables generation of prefetching instructions such as dcbt and
dcbz in compiled code.
is a colon-separated list of the following
suboptions:
assistthread | noassistthread
Use this supoption to work with applications that generate
a high cache-miss rate. When you run
-qprefetch=assistthread, the compiler uses the delinquent
load information to perform analysis and generates
prefetching assist threads.
aggressive | noaggressive
When you run this supoption, the system guides the compiler
to generate aggressive data prefetching at optimization
level -O3 -qhot or higher.
DDeeffaauulltt:: noaggressive
You can specify system architectures when using
-qprefetch=assistthread:
CMP
For systems based on the chip multi-processor
architecture (CMP), use -qprefetch=assistthread=cmp.
SMT
For systems based on the simultaneous multi-threading
architecture (SMT), use -qprefetch=assistthread=smt.
DDeeffaauulltt:: -qprefetch
-qprocimported[=] | -qnoprocimported
Specifies functions that the compiler can assume are imported.
Imported functions are dynamically bound with a shared portion
of a library. Code generated for calls to functions marked as
imported may be larger, but is faster than the default code
sequence generated for functions marked as unknown.
is a colon-separated list of function identifiers.
(C++) In C++ programs, function names must be specified using
their mangled names.
-qproclocal[=] | -qnoproclocal
Specifies functions that the compiler can assume are local.
Local functions are statically bound with the functions that
call them; smaller, faster code is generated for calls to such
functions. is a colon-separated list of function
identifiers.
(C++) In C++ programs, function names must be specified using
their mangled names.
-qprocunknown[=] | -qnoprocunknown
Specifies functions that the compiler can assume are
unknown. Unknown functions are resolved to either
statically or dynamically bound objects during linking.
is a colon-separated list of function
identifiers.
(C++) In C++ programs, function names must be specified using
their mangled names.
-qinline[] | -qnoinline
Attempts to inline procedures instead of generating calls to
those procedures, for improved performance.
(C++) Specifying -qinline enables automatic inlining by the
compiler front end. Specifying -qinline with -O provides
additional inlining by enabling inlining by the low-level
optimizer.
-qinline+
Attempts to inline the functions listed in
and any other appropriate functions, where
is a colon-separated list.
-qinline-
Specifies that functions listed in do not
get inlined, where is a colon-separated
list.
function_name
A colon separated list of function names to be inlined.
auto | noauto
Enables or disables auto inlining.
level=number
The values you specify must be positive integers between 0
and 10 inclusive. The default value for number is 5. Larger
values increase the likelihood of inlining.
threshold
Represents the number of executable statements in a
function.
DDeeffaauulltt::
o -qnoinline
o -qinline=noauto:level=5
o At an optimization level of -O0, -qinline implies
-qinline=noauto:level=5
o At an optimization level of -O2 or higher, -qinline
implies -qinline=auto:level=5
-qshowpdf | -qnoshowpdf
Used with -qpdf1 and a minimum optimization level of -O2 to add
additional call and block count profiling information to an
executable.
DDeeffaauulltt:: -qnoshowpdf
-qsimd[=]
Controls whether the compiler can automatically take advantage
of vector instructions for processors that support them. -qsimd
can take the following suboption:
auto | noauto
Enables or disables the automatic generation of vector
instructions for processors that support them.
DDeeffaauulltt:: -qsimd=noauto
-qsmallstack | -qnosmallstack
Reduces the size of the stack frame. This option is only valid
when used together with IPA (-qipa, -O4, -O5 compiler options).
DDeeffaauulltt:: -qnosmallstack
-qsmp[=] | -qnosmp
Enables parallelization of program code. is a
colon-separated list of one or more of the following suboptions:
auto | noauto
Enables automatic parallelization and optimization. If
noauto is specified, automatic parallelization of program
code is disabled; only program code explicitly parallelized
with OpenMP directives is optimized.
DDeeffaauulltt:: auto
explicit | noexplicit
Enables explicit parallelization of loops.
DDeeffaauulltt:: explicit
nested_par | nonested_par
If nested_par is specified, prescriptive nested parallel
constructs are parallelized by the compiler.
DDeeffaauulltt:: nonested_par
omp | noomp
Enables strict OpenMP compliance. Only OpenMP
parallelization pragmas are recognized.
DDeeffaauulltt:: noomp
opt | noopt
Enables automatic parallelization but disables optimization
of parallelized program code. If noopt is specified,
optimization of parallelized program code is disabled.
DDeeffaauulltt:: opt
ostls | noostls
Enables Thread Local Storage (TLS) provided by the
operating system to be used for threadprivate data. The
noostls suboption is to enable the non-TLS for
threadprivate.
DDeeffaauulltt:: ostls
rec_locks | norec_locks
Specifies whether to use recursive locks.
DDeeffaauulltt:: norec_locks
schedule=
Specifies what kinds of scheduling algorithms and chunking
are used for loops to which no other scheduling algorithm
has been explicitly assigned in the source code. can
be:
o affinity[=]
o auto
o dynamic[=]
o guided[=]
o runtime
o static[=],
where is the number of loop iterations.
DDeeffaauulltt:: schedule=runtime
stackcheck | nostackcheck
Causes the compiler to check for stack overflow by worker
threads at run time, and issue a warning if the remaining
stack size is less than the number of bytes specified by
the stackcheck option of the XLSMPOPTS environment
variable. This suboption is intended for debugging
purposes, and only takes effect when XLSMPOPTS=stackcheck
is also set.
DDeeffaauulltt:: nostackcheck
threshold[=]
When -qsmp=auto is in effect, controls the amount of
automatic loop parallelization that occurs. The value of
represents the lower limit allowed for
parallelization of a loop, based on the level of "work"
present in a loop.
DDeeffaauulltt::
must be a positive integer of 0 or greater. If you
specify threshold with no suboption, the program uses a
default value of 100.
Specifying -qsmp without suboptions is equivalent to
-qsmp=auto:explicit:opt:noomp:norec_locks:
nonested_par:schedule=runtime:nostackcheck:threshold=100:ostls
DDeeffaauulltt:: -qnosmp
-qstrict[=] | -qnostrict
Ensures that optimizations done by default at optimization
levels -O3, and higher, and optionally at -O2, do not alter the
semantics of a program.
The -qstrict=all, -qstrict=precision, -qstrict=exceptions,
-qstrict=ieeefp, and -qstrict=order suboptions and their
negative forms are group suboptions that affect multiple,
individual suboptions. Group suboptions act as if either the
positive or the no form of every suboption of the group is
specified.
DDeeffaauulltt::
o Always -qstrict or -qstrict=all when the -qnoopt or -O0
optimization level is in effect
o -qstrict or -qstrict=all is the default when the -O2 or
-O optimization level is in effect
o -qnostrict or -qstrict=none is the default when -O3 or a
higher optimization level is in effect
is a colon-separated list of one or more of
the following:
all | none
all disables all semantics-changing transformations,
including those controlled by the ieeefp, order, library,
precision, and exceptions suboptions. none enables these
transformations.
precision | noprecision
precision disables all transformations that are likely to
affect floating-point precision, including those controlled
by the subnormals, operationprecision, association,
reductionorder, and library suboptions. noprecision
enables these transformations.
exceptions | noexceptions
exceptions disables all transformations likely to affect
exceptions or be affected by them, including those
controlled by the nans, infinities, subnormals, guards, and
library suboptions. noexceptions enables these
transformations.
ieeefp | noieeefp
ieeefp disables transformations that affect IEEE floating-
point compliance, including those controlled by the nans,
infinities, subnormals, zerosigns, and operationprecision
suboptions. noieeefp enables these transformations.
nans | nonans
nans disables transformations that may produce incorrect
results in the presence of, or that may incorrectly produce
IEEE floating-point NaN (not-a-number) values. nonans
enables these transformations.
infinities | noinfinities
infinities disables transformations that may produce
incorrect results in the presence of, or that may
incorrectly produce floating-point infinities.
noinfinities enables these transformations.
subnormals | nosubnormals
subnormals disables transformations that may produce
incorrect results in the presence of, or that may
incorrectly produce IEEE floating-point subnormals
(formerly known as denorms). nosubnormals enables these
transformations.
zerosigns | nozerosigns
zerosigns disables transformations that may affect or be
affected by whether the sign of a floating-point zero is
correct. nozerosigns enables these transformations.
operationprecision | nooperationprecision
operationprecision disables transformations that produce
approximate results for individual floating-point
operations. nooperationprecision enables these
transformations.
vectorprecision | novectorprecision
vectorprecision disables vectorization in loops where it
might produce different results in vectorized iterations
than in nonvectorized residue iterations, to ensure that
every loop iteration of identical floating point operations
on identical data produces identical results.
novectorprecision enables vectorization even when different
iterations might produce different results from the same
inputs.
order | noorder
order disables all code reordering between multiple
operations that may affect results or exceptions, including
those controlled by the association, reductionorder, and
guards suboptions. noorder enables code reordering.
association | noassociation
association disables reordering operations within an
expression. noassociation enables reordering operations.
reductionorder | noreductionorder
reductionorder disables parallelizing floating-point
reductions. noreductionorder enables parallelizing these
reductions.
guards | noguards
guards disables moving operations past guards (that is,
past if statements, out of loops, or past function calls
which might end the program or throw an exception) which
control whether the operation should be executed. noguards
enables moving operations past guards.
library | nolibrary
library disables transformations that affect floating-point
library functions. nolibrary enables these transformations.
-qstrict_induction | -qnostrict_induction
Turns off loop induction variable optimizations that have the
potential to alter the semantics of your program.
DDeeffaauulltt::
-qnostrict_induction at -O2 or higher.
-qstrict_induction otherwise.
-qtune=
Specifies the architecture system for which the executable
program is optimized.
must be one of the following:
auto
Generates object code optimized for the hardware platform
on which the program is compiled.
balanced
Optimizations are tuned across a selected range of recent
hardware.
ppc970
Generates instructions specific to PowerPC 970 hardware
platforms.
pwr3
Generates object code optimized for the POWER3 hardware
platforms.
pwr4
Generates object code optimized for the POWER4 hardware
platforms.
pwr5
Generates object code optimized for the POWER5 hardware
platforms.
pwr6
Generates object code optimized for the POWER6 hardware
platforms.
pwr7
Generates object code optimized for the POWER7 hardware
platforms.
rs64b
Generates object code optimized for the RS64II processor.
rs64c
Generates object code optimized for the RS64III processor.
DDeeffaauulltt:: -qtune=balanced
-qunroll[=] | -qnounroll
Unrolls inner loops in the program. This can help improve
program performance. The suboptions are:
auto
Instructs the compiler to perform basic loop unrolling.
yes
Instructs the compiler to search for more opportunities for
loop unrolling than that performed with auto. In general,
this suboption is more likely to increase compile time or
program size than auto processing, but it may also improve
your application’s performance.
no
Instructs the compiler to not unroll loops.
DDeeffaauulltt:: -qunroll=auto
If -qunroll is specified with no suboptions, the compiler
assumes -qunroll=yes. -qnounroll is equivalent to -qunroll=no.
-qunwind | -qnounwind
Informs the compiler that the stack can be unwound while a
routine in the compilation is active. Specifying -qnounwind can
improve the optimization of non-volatile register saves and
restores.
DDeeffaauulltt:: -qunwind
LLiinnkkiinngg ooppttiioonnss
-qcrt | -qnocrt
Instructs the linker to use the standard system startup files at
link time.
DDeeffaauulltt:: -qcrt
-e
Sets the entry name for a shared executable and is only used
together with -qmkshrobj.
-L
Searches the path directory for library files specified by the
-l option.
DDeeffaauulltt::
The default is to search only the standard directories.
-l
Searches the file lib.so and then lib.a for dynamic
linking, or only lib.a for static linking.
DDeeffaauulltt::
The default is to search only some of the compiler runtime
libraries.
-qlib | -qnolib
Specifies whether the compiler should use the standard system
libraries at link time. -qnolib is similar to the gcc option
nostdlib; the driver will not pass the standard system startup
files or libraries when linking.
DDeeffaauulltt:: -qlib
-R
Writes search paths for shared libraries into the executable at
link time, so that these directories are searched at program run
time for any required shared libraries.
If the -R option is specified both in the
configuration file and on the command line, the paths specified
in the configuration file are searched first at run time.
-qstaticlink[=libgcc] | -qnostaticlink[=libgcc]
Specifies how shared libraries are linked into the application,
where:
-qstaticlink
Objects generated with this compiler option in effect will
not link with shared libraries.
-qstaticlink=libgcc
Links to the static version of libgcc.
-qnostaticlink
Links shared libraries with the object file named in the
invocation.
-qnostaticlink=libgcc
Links to the shared version of libgcc.
DDeeffaauulltt:: -qnostaticlink
PPoorrttaabbiilliittyy aanndd mmiiggrraattiioonn ooppttiioonnss
-qabi_version=
(C++) Instructs the compiler to use version of the C++
Application Binary Interface (ABI), where is one of the
following:
1
Allows users to get the same C++ ABI behavior as GNU C++
3.2
2
Allows users to get the same C++ ABI behavior as GNU C++
3.4
DDeeffaauulltt::
The default value depends on the level of GNU C++
configured during installation:
o -qabi_version=1 if GNU C++ 3.2 or 3.3 is installed.
o -qabi_version=2 if GNU C++ 3.4 or 4.0 is installed.
-qalign=
Specifies what aggregate alignment rules the compiler uses for
file compilation, where the alignment suboptions are:
bit_packed
The compiler uses the bit_packed alignment rules.
linuxppc
The compiler uses the default GCC alignment rules to
maintain compatibility with GCC objects.
DDeeffaauulltt:: -qalign=linuxppc
-qgenproto[=parmnames] | -qnogenproto
(C) Generates ANSI prototypes from K&R function definitions and
displays them on standard output. Specifying -qgenproto without
’=parmnames’ will cause prototypes to be generated without
parameter names.
DDeeffaauulltt:: -qnogenproto
-qpack_semantic={gnu|ibm}
Controls the syntax and semantics of the #pragma pack directive.
gnu
Uses the GCC syntax and semantics for #pragma pack.
ibm
Uses the IBM syntax and semantics for #pragma pack.
You should not need to use this option unless you are porting
applications compiled with GCC and need to preserve source-level
compatibility with the GCC version of the pragma directive.
DDeeffaauulltt:: -qpack_semantic=ibm
-qupconv | -qnoupconv
(C) Preserves the unsigned specification when performing
integral promotions.
DDeeffaauulltt::
o -qupconv when -qlanglvl={extended|classic}
o -qnoupconv otherwise
CCoommppiilleerr ccuussttoommiizzaattiioonn ooppttiioonnss
-qasm_as[= []] | -qnoasm_as
Specifies the path and flags used to invoke the assembler in
order to handle assembler code in an asm statement.
is the full path to the assembler to be used, and
is a series of one or more flags (and their arguments),
separated by spaces. Single quotes (or double quotes) are
required around the string of arguments if any spaces exist.
-B[]
Determines substitute path names for programs used during
compilation, such as the compiler, assembler, linkage editor,
and preprocessor, where can be the path of any program
name recognized by the -t compiler option. The optional
defines part of a path name to the new programs. The -t
parameter, , specifies the program to which the
is to be appended. When specifying , there must
be a slash (/) after the folder name.
-qcomplexgccincl[=] | -qnocomplexgccincl[=]
Specifies whether to use GCC parameter-passing conventions for
complex data types (equivalent to enabling -qfloat=complexgcc)
for selected include files only.
When -qcomplexgccincl is in effect, the compiler internally
wraps #pragma complexgcc(on) and #pragma complexgcc(pop)
directives around include files found in a specified directory.
DDeeffaauulltt:: -qcomplexgccincl=/usr/include
-qc_stdinc=
(C) Changes the standard search location for the XL C headers.
is a colon-separated list of paths to search.
-qcpp_stdinc=
(C++) Specifies the standard search directories for the XL C++
headers, where is a colon-separated list of paths.
-F[][:]
Names an alternative configuration file (.cfg) for the compiler.
is the name of a compiler configuration file.
is the name of the command used to invoke the compiler.
This directs the compiler to use the entries under in
the to set up the compiler environment. At least
one of the arguments must be supplied.
-qgcc_c_stdinc=
(C) Specifies the standard search directories for the GNU C
system header files. is a list of one or more
paths. This option is ignored if the -qnostdinc option is in
effect.
-qgcc_cpp_stdinc=
(C++) Specifies the standard search directories for the XL C++
headers. is a list of one or more search
directories. This option is ignored if the -qnostdinc option is
in effect.
-qpath=:
Constructs alternate program names for compiler components. The
program and directory path specified are used in place of the
regular program. can be one of the following:
a = Assembler
b = Low-level optimizer
c = Compiler front end
C = C++ compiler front end
d = Disassembler
I = High-level optimizer - compile step
L = High-level optimizer - link step
l = Linker
-qspill=
Specifies the size of the register allocation spill area in
bytes.
DDeeffaauulltt:: -qspill=512
-t
Applies the prefix from the -B option to the specified programs
in . is a chain (i.e: -tbcI) of
one or more of the following:
a = Assembler
b = Low-level optimizer
c = Compiler front end
C = C++ compiler front end
d = Disassembler
I = High-level optimizer - compile step
L = High-level optimizer - link step
l = Linker
-W,
Gives the specified option(s) to the compiler program,
. is a comma-separated list of one or
more options.