List of Batch Compiler Options and Their Defaults

This page lists all VisualAge C++ batch compiler 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.

The compiler options pages describe each of the compiler options, including:

Uppercase letters in the option, suboption, or #pragma options keyword syntax represent its valid abbreviation. For example, both of the following are acceptable specifications of the LANGlvl option in a source file:

#pragma options lang=ansi
#pragma options langlvl=ansi

Options that appear entirely in lowercase must be entered in full.

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

32

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

aggrcopy

-opt

See aggrcopy.

Enables destructive copy operations for structures and unions.

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.

alloca

-qopt

-

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

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.

bmaxdata

-flag

0

Sets the size of the heap in bytes.

brtl

-flag

-

Enables runtime linking.
bstatic, bdynamic, bshared

-flag

bdynamic

Instructs the linker to process subsequent shared objects as either dynamic (shared) or static.
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.

cache

-qopt

-

Specify a cache configuration for a specific execution machine.

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.

-qcincl=path

-qopt

nocincl

Includes files from /user/include by inserting extern "C" { before each <prefix> and inserting } after it.

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

see digraph

Allows use of digraph character sequences in your program.

dollar

-qopt

nodollar

Allows the $ symbol to be used in the names of identifiers.

dpcl

-qopt

nodpcl

Generates block scopes to support the IBM Dynamic Probe Class Library.
Option Name Type Default Description

E

-flag

-

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

e <name>

-flag

-

Specifies the entry name for the shared object. Equivalent to using ld -e name. See your system documentation for additional information about ld options.

eh

-qopt

eh

Controls exception handling.

enum

-qopt

enum=int

Specifies the amount of storage occupied by the enumerations.

expfile

-qopt

-

Saves all exported symbols in a file.

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.

f

-flag

-

Names a file to store a list of object files.

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 distributed graphical debugger.

funcsect

-qopt

nofuncsect

.
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 a debugger such as the Distributed 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.

haltonmsg

-qopt

-

Instructs the compiler to stop after the compilation phase when it encounters a specific error message.

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

keyword

-qopt

See keyword

Controls whether a specified string is treated as a keyword or an identifier.

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.

longlit

-qopt

nolonglit

Makes unsuffixed literals the long type for 64-bit mode.

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
maxmem=8196

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.

mkshrobj

-qopt

-

Creates a shared object from generated object files.
Option Name Type Default Description

namemangling

-qopt

namemangling=ansi

Selects the name mangling scheme for external symbol names generated from C++ source code.

nans

-qopt

-

A floating point option.

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.

objmodel

-qopt

compat

Sets the type of object model.

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.

path

-qopt

-

.

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

See proclocal

Mark functions as local, imported, or unknown.

profile

-qopt

noprofile

Sets up the object files for profiling. Suboptions indicate the profiling tool.

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.
Option Name Type Default Description

S

-flag

-

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

s

-flag

-

Strips symbol table.

showinc

-qopt

noshowinc

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

 smp

-qopt

nosmp

Specifies if and how parallelized object code is generated.

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.

staticinline

-qopt

nostaticinline

Controls whether inline functions are treated as static or extern.

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 of the -O3 option 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.

suppress

-qopt

nosuppress

Specifies compiler message numbers to be suppressed.

symtab

-qopt

-

Set symbol tables for unreferenced variables or xcoff objects.

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. -tE replaces the CreateExportList script.

tabsize

-qopt

tabsize=8

Changes the length of tabs as perceived by the compiler.

tbtable

-qopt

tbtable=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.

threaded

-qopt

See threaded.

Indicates that the program will run in a multi-threaded environment.

tmplparse

-qopt

tmplparse=no

Controls whether parsing and semantic checking are applied to template definition implementations.

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 in a command-like format.

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. See also rndflt.

Z

-flag

-

Specifies a search path for library names.

* beside the default value for a compiler option indicates that you should see the description for that option for special notes regarding the default value.



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
Equivalent Batch Compile-Link and Incremental Build Options