New compiler options

Compiler options can be specified on the command line or through directives embedded in your application source files.

New command line options

The following table summarizes command line options new to XL C/C++. You can find detailed syntax and usage information for all compiler options in Compiler options reference.

Option Description and remarks
-qasm The -qasm compiler option now adds new functionality. You can now not only use this compiler option to control how inline assembler statements in your program are interpreted, but you can also control whether or not code is emitted for the asm statement.
-qasm_as The syntax of the -qasm_as compiler option has changed slightly.
-qdump_class_hierarchy When this option is in effect, the compiler dumps a representation of the hierarchy and virtual function table layout for each class object to a file.
-qlist The -qlist compiler option adds new offset and nooffset suboptions. Specifying -qlist=offset instructs the compiler to show object listing offsets from the start of a procedure rather than from the start of code generation.
-qmakedep The -qmakedep compiler option adds a new gcc suboption. Specifying -qmakedep=gcc instructs the compiler to generate make dependency information in a format similar to that used by the GNU C/C++ compiler.
-MF This new compiler option specifies a filename for the make dependency file generated by the -qmakedep or -M option.
-qppline This new compiler option enables generation of #line directives in preprocessed output. The -qnoppline compiler option disables generation of #line directives.
-qreserved_reg This new compiler option lets you reserve one or more register names. A reserved register cannot be used during compilation except as a stack pointer, frame pointer or in some other fixed role.
-qsourcetype This release adds assembler-with-cpp as a new suboption to the -qsourcetype compiler option.

Ordinarily, the compiler recognizes assembler source files that require preprocessing by the file's .S filename suffix. The compiler preprocesses .S source files and then sends the preprocessor output to the assembler.

Specifying -qsourcetype=assembler-with-cpp filename on the command line instructs the compiler to treat all filenames appearing after the assembler-with-cpp, regardless of filename suffix, as being assembler source files requiring preprocessing.

-qtmplinst This new compiler option manages how the compiler performs implicit instantiations of templates.
-qversion Specifying the -qversion compiler option returns the official compiler product name and version.

New pragma directives

The following table summarizes pragma directive options new to XL C/C++. You can find detailed syntax and usage information in XL C/C++ Pragmas.

#pragma Directive Description and remarks
altivec_vrsave When the altivec_vrsave directive is in effect, function prologs and epilogs include code to maintain the VRSAVE register. This pragma has effect only when -qaltivec is in effect, must be used only within a function, and affects only the function in which it appears.
STDC CX_LIMITED_RANGE The STDC CX_LIMITED_RANGE directive instructs the compiler that within the scope it controls, complex division and absolute value are only invoked with values such that intermediate calculation will not overflow or lose significance.

Related Information