Options that control output

Table 12. Options for file output
Option name Type Default Description
-E -flag - Instructs the compiler to preprocess the source files.
-M -flag - Creates an output file that contains targets suitable for inclusion in a description file for the make command.
-MF -flag - Specifies an output location for the output generated by the -qmakedep or -M option.
-o -flag - Specifies an output location for the object, assembler, or executable files created by the compiler.
-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.
-S -flag - Generates an assembly language file (.s) for each source file.
-s -flag - Strips symbol table.
-qfuncsect -qopt -qnofuncsect Place instructions for each function in a separate object file control section or csect.
-qmakedep -qopt - Creates an output file that contains targets suitable for inclusion in a description file for the make command.
-qppline -qopt -qppline Enables generation of #line directive in the preprocessed output

Table 13. Options for signedness
Option name Type Default Description
-qbitfields -qopt -qbitfields=unsigned Specifies if bit fields are signed.
-qchars -qopt -qchars=unsigned Instructs the compiler to treat all variables of type char as either signed or unsigned.
C only -qupconv -qopt -qnoupconv Preserves the unsigned specification when performing integral promotions.

Table 14. Options for data size and alignment
Option name Type Default Description
-qalign -qopt -qalign=full Specifies what aggregate alignment rules the compiler uses for file compilation.
-qenum -qopt -qenum=intlong Specifies the amount of storage occupied by enumerations.

Table 15. Options that control the characteristics of the object code
Option name Type Default Description
-qenablevmx -qopt See -qenablevmx Enables generation of VMX (Vector Multimedia Extension) instructions.
C++ only -qnamemangling -qopt -qnamemangling=ansi Selects the name mangling scheme for external symbol names generated from C++ source code.
C++ only -qobjmodel -qopt -qobjmodel=classic Sets the type of object model.
-qpic -qopt -qpic=small Instructs the compiler to generate Position-Independent Code suitable for use in shared libraries.

C only

-qreserved_reg
-qopt - Indicates that the given list of registers cannot be used during the compilation except as a stack pointer, frame pointer or in some other fixed role.
C++ only -qstaticinline -qopt -qnostaticinline Treats inline functions as being static.
-qstatsym -qopt -qnostatsym Adds user-defined, non-external names that have a persistent storage class to the name list.
C++ only -qunique -qopt -qnounique Generates unique names for static constructor/destructor file compilation units.
C++ only -qvftable -qopt -qvftable Controls the generation of virtual function tables.
-qweaksymbol -qopt -qnoweaksymbol Instructs the compiler to generate weak symbols.
-qxcall -qopt -qnoxcall Generates code to treat static routines within a compilation unit as if they were external calls.

Table 16. Options that control the placement of strings and constant data
Option name Type Default Description
-qro -qopt See -qro. Specifies the storage type for string literals.
-qroconst -qopt See -qroconst. Specifies the storage location for constant values.
-qroptr -qopt -qnoroptr Specifies the storage location for constant pointers.

Table 17. Other output options
Option name Type Default Description
-# (pound sign) -flag - Traces the compilation without doing anything.
-c -flag - Instructs the compiler to pass source files to the compiler without sending them to the linkage editor.
C only -ma -flag - Substitutes inline code for calls to function alloca as if #pragma alloca directives are in the source code.
-q32, -q64 -qopt -q32 Selects 32-bit or 64-bit compiler mode.
C only -qalloca -qopt - Substitutes inline code for calls to function alloca as if #pragma alloca directives are in the source code.
C++ only -qrtti -qopt -qnortti Generates runtime type identification (RTTI) information for the typeid operator and the dynamic_cast operator.
-qsaveopt -qopt -qnosaveopt Saves the compiler options into an object file.
-qthreaded -qopt See -qthreaded. Indicates that the program will run in a multi-threaded environment.