List of Compiler Options and Their Defaults

This page lists all IBM C and C++ Compilers options, specifying each compiler option's type and if it exists, default value. Where a * appears beside the default value for a compiler option, see the description for that option for special notes regarding the default value.

To get detailed information on any option listed, click on the that option's name in the table.

Option Name Type Default Description

+

-flag

-

Compiles any file, filename.nnn, as a C++ language file, where nnn is any suffix other than .o, .a, or .s.

#

-flag

-

Traces the compilation without doing anything.

32, 64

-qopt

-

Selects 32- or 64-bit compiler mode.
Option Name Type Default Description

alias

-qopt

See alias.

Specifies which type-based aliasing is to be used during optimization.

align

-qopt

align=full

Specifies what aggregate alignment rules the compiler uses for file compilation.

ansialias

-qopt

ansialias*

Specifies whether type-based aliasing is to be used during optimization.

arch

-qopt

arch=com

Specifies the architecture on which the executable program will be run.

assert

-qopt

noassert

Requests the compiler to apply aliasing assertions to your compilation unit.

attr

-qopt

noattr

Produces a compiler listing that includes an attribute listing for all identifiers.
Option Name Type Default Description

B

-flag

-

Determines substitute path names for the compiler, assembler, linkage editor, and preprocessor.

bitfields

-flag

unsigned

Specifies if bitfields are signed.

brtl

-flag

-

Tells the linkage editor to accept both .so and .a library file types.

bstatic, bdynamic

-flag

bdynamic

Determines which types of library files are searched by the linkage editor.
Option Name Type Default Description

C

-flag

-

Preserves comments in preprocessed output.

c

-flag

-

Instructs the compiler to pass source files to the compiler only.

chars

-qopt

chars=unsigned

Instructs the compiler to treat all variables of type char as either signed or unsigned.

check

-qopt

nocheck

Generates code which performs certain types of run-time checking.

compact

-qopt

nocompact

When used with optimization, reduces code size where possible, at the expense of execution speed.

cpluscmt

-qopt

nocpluscmt

Use this option if you want C++ comments to be recognized in C source files.
Option Name Type Default Description

D

-flag

-

Defines the identifier name as in a #define preprocessor directive.

dataimported, datalocal

-qopt

dataimported

Mark data as local or imported.

dbxextra

-qopt

nodbxextra

Specifies that all typedef declarations, struct, union, and enum type definitions are included for xldb processing.

digraph

-qopt

nodigraph

Allows use of digraph character sequences in your program.

dollar

-qopt

nodollar

Allows the $ symbol to be used in the names of identifiers.
Option Name Type Default Description

E

-flag

-

Runs the source files named in the compiler invocation through the preprocessor.

enum

-qopt

enum=int

Specifies the amount of storage occupied by the enumerations.

extchk

-qopt

noextchk

Generates bind-time type checking information and checks for compile-time consistency.
Option Name Type Default Description

F

-flag

-

Names an alternative configuration file for xlC.

fdpr

-qopt

nofdpr

Collect program information for use with the AIX fdpr performance-tuning utility.

flag

-qopt

flag=i:i

Specifies the minimum severity level of diagnostic messages to be reported.

float

-qopt

See float.

Specifies various floating point options to speed up or improve the accuracy of floating point operations.

flttrap

-qopt

noflttrap

Generates extra instructions to detect and trap floating point exceptions.

fold

-qopt

fold

Specifies that constant floating point expressions are to be evaluated at compile time.

fullpath

-qopt

nofullpath

Specifies what path information is stored for files when you use -g and the graphical debugger, xldb.
Option Name Type Default Description

G

-flag

-

Linkage editor (ld command) option only. Used to generate a dynamic libary file.

g

-flag

-

Generates debugging information used by the xldb graphical debugger.

genpcomp

-qopt

nogenpcomp

Generates a precompiled version of any header file for which the original source is used.

genproto

-qopt

nogenproto

Produces ANSI prototypes from K&R function definitions.
Option Name Type Default Description

halt

-qopt

halt=s

Instructs the compiler to stop after the compilation phase when it encounters errors of specified severity or greater.

heapdebug

-qopt

noheapdebug

Enables debug versions of memory management functions.

hsflt

-qopt

nohsflt

Speeds up calculations by removing range checking on single-precision float results and on conversions from floating point to integer.

hssngl

-qopt

nohssngl

Specifies that single-precision expressions are rounded only when the results are stored into float memory locations.
Option Name Type Default Description

I

-flag

-

Specifies an additional search path if the file name in the #include directive is not specified using its absolute path name.

idirfirst

-qopt

noidirfirst

Specifies the search order for files included with the #include "file_name" directive.

ignerrno

-qopt

noignerrno

Allows the compiler to perform optimizations that assume errno is not modified by system calls.

ignprag

-qopt

-

This option is useful for detecting aliasing pragma errors.

info

-qopt

noinfo

Produces informational messages.

initauto

-qopt

noinitauto

Initializes automatic storage to the two-digit hexadecimal byte value hex_value.

inlglue

-qopt

noinlglue

Generates fast external linkage by inlining the pointer glue code necessary to make a call to an external function or a call through a function pointer.

inline

-qopt

See inline.

Attempts to inline functions instead of generating calls to a function.

ipa

-qopt

object (compile-time),
noipa (link-time)

Turns on or customizes a class of optimizations known as interprocedural analysis (IPA).

isolated_call

-qopt

-

Specifies functions in the source file that have no side effects.
Option Name Type Default Description

L

-flag

See L.

Searches the specified directory for library files specified by the -l option.

l

-flag

See l.

Searches a specified library for linking.

langlvl

-qopt

langlvl=ansi*

Selects the C or C++ language level for compilation.

ldbl128, longdouble

-qopt

noldbl128

Increases the size of long double type from 64 bits to 128 bits.

libansi

-qopt

nolibansi

Assumes that all functions with the name of an ANSI C library function are in fact the system functions.
linedebug -qopt nolinedebug Generates abbreviated line number and source file name information for the debugger.

list

-qopt

nolist

Produces a compiler listing that includes an object listing.

listopt

-qopt

nolistopt

Produces a compiler listing that displays all options in effect.

longlong

-qopt

longlong*

Allows long long types in your program.
Option Name Type Default Description

M

-flag

-

Creates an output file that contains targets suitable for inclusion in a description file for the AIX make command.

ma

-flag

-

Substitutes inline code for calls to function alloca as if #pragma alloca directives are in the source code.

macpstr

-qopt

nomacpstr

Converts Pascal string literals into null-terminated strings where the first byte contains the length of the string.

maf

-qopt

maf

Specifies whether the floating-point multiply-add instructions are to be generated.

makedep

-qopt

-

Creates an output file that contains targets suitable for inclusion in a description file for the AIX make command.

maxerr

-qopt

nomaxerr

Instructs the compiler to halt compilation when a specified number of errors of specified or greater severity is reached.

maxmem

-qopt

maxmem=2048

Limits the amount of memory used for local tables of specific, memory-intensive optimizations.

mbcs, dbcs

-qopt

nombcs

Use the -qmbcs option if your program contains multibyte characters.
Option Name Type Default Description

noprint

-qopt

-

Suppresses listings.
Option Name Type Default Description

O, optimize

-qopt, -flag

nooptimize

Optimizes code at a choice of levels during compilation.

o

-flag

-

Specifies a name or directory for the output executable file(s) created either by the compiler or the linkage editor.

once

-qopt

noonce

Avoids including a header file more than once even if it is specified in several of the files you are compiling.
Option Name Type Default Description

P

-flag

-

Preprocesses the C or C++ source files named in the compiler invocation and creates an output preprocessed source file for each input source file.

p

-flag

-

Sets up the object files produced by the compiler for profiling.

pascal

-qopt

nopascal

Ignores the word pascal in type specifiers and function declarations.

pdf1, pdf2

-qopt

nopdf1
nopdf2

Tunes optimizations through Profile-Directed Feedback.

pg

-flag

-

Sets up the object files for profiling, but provides more information than is provided by the -p option.

phsinfo

-qopt

nophsinfo

Reports the time taken in each compilation phase.

priority

-qopt

-

Specifies the priority level for the initialization of static constructors

proclocal, procimported, procunknown

-qopt

proclocal*

Mark functions as local, imported, or unknown.

proto

-qopt

noproto

Assumes all functions are prototyped.
Option Name Type Default Description

Q

-flag

See Q.

Attempts to inline functions instead of generating calls to a function.
Option Name Type Default Description

r

-flag

-

Produces a relocatable object.

rndsngl

-qopt

norndsngl

Specifies that the result of each single-precision (float) operation is to be rounded to single precision.

ro

-qopt

ro*

Specifies the storage type for string literals.

roconst

-qopt

roconst*

Specifies the storage location for constant values.

rrm

-qopt

norrm

Prevents floating-point optimizations that are incompatible with run-time rounding to plus and minus infinity modes.

rtti

-qopt

nortti

Generates run-time type identification (RTTI) information for the typeid operator and the dynamic_cast operator.

rwvftable

-qopt

norwvftable

Specifies whether virtual function tables are to be put into read/write or read-only storage.
Option Name Type Default Description

S

-flag

-

Generates an assembly language file (.s) for each source file.

showinc

-qopt

noshowinc

If used with -qsource, all the include files are included in the source listing.

source

-qopt

nosource

Produces a compiler listing and includes source code.

spill

-qopt

spill=512

Specifies the size of the register allocation spill area.

spnans

-qopt

nospnans

Generates extra instructions to detect signalling NaN on conversion from single precision to double precision.

srcmsg

-qopt

nosrcmsg

Adds the corresponding source code lines to the diagnostic messages in the stderr file.

statsym

-qopt

nostatsym

Adds user-defined, non-external names that have a persistent storage class to the name list.

stdinc

-qopt

stdinc

Specifies which files are included with #include <file_name> and #include "file_name" directives.

strict

-qopt

See strict.

Turns off aggressive optimizations that have the potential to alter the semantics of your program.

strict_induction

-qopt

See strict_induction.

Disables loop induction variable optimizations that have the potential to alter the semantics of your program.

syntaxonly

-qopt

-

Causes the compiler to perform syntax checking without generating an object file..
Option Name Type Default Description

t

-flag

See t.

Adds the prefix specified by the -B option to designated programs.

tabsize

-qopt

tabsize=8

Changes the length of tabs as perceived by the compiler.

tbtable

-qopt

full*

Sets traceback table characteristics.

tempinc

-qopt

See tempinc.

Generates separate include files for template functions and class declarations, and places these files in a directory which can be optionally specified.

tempmax

-qopt

tempmax=1

Specifies the maximum number of template include files to be generated by the tempinc option for each header file.

tune

-qopt

See tune.

Specifies the architecture for which the executable program is optimized.

twolink

-qopt

notwolink*

Minimizes the number of static constructors included from libraries.
Option Name Type Default Description

U

-flag

-

Undefines a specified identifier defined by the compiler or by the -D option.

unique

-qopt

nounique

Generates unique names for static constructor/deconstructor file compilation units.

unroll

-qopt

unroll=4*

Unrolls inner loops in the program by a specified factor.

upconv

-qopt

noupconv*

Preserves the unsigned specification when performing integral promotions.

usepcomp

-qopt

nousepcomp

Use precompiled header files for any files that have not changed since the precompiled header was created.
Option Name Type Default Description

v

-flag

-

Instructs the compiler to report information on the progress of the compilation.

vftable

-flag

See vftable.

Controls the generation of virtual function tables.
Option Name Type Default Description

W

-flag

-

Passes the listed words to a designated compiler program.

w

-flag

-

Requests that warning messages be suppressed.

warn64

-qopt

nowarn64

Enables warning of possible long to integer data truncations.
Option Name Type Default Description

xcall

-qopt

noxcall

Generates code to static routines within a compilation unit as if they were external calls.

xref

-qopt

noxref

Produces a compiler listing that includes a cross-reference listing of all identifiers.

Option Name Type Default Description

y

-flag

-

Specifies the compile-time rounding mode of constant floating-point expressions.



Options that Specify Compiler Characteristics
Options that Specify Debugging Features
Options that Specify Preprocessor Options
Options that Specify Compiler Output
Options that Define the Compiler Object Code Produced
Options that Specify Linkage Options
Resolving Conflicting Compiler Options