Sun Studio 12: C++ User's Guide

3.3.1 Code Generation Options

Table 3–2 Code Generation Options

Option 

Action  

–compat

Sets the major release compatibility mode of the compiler. 

+e{0|1}

Controls virtual table generation. 

–g

Compiles for use with the debugger. 

–KPIC

Produces position-independent code. 

–Kpic

Produces position-independent code. 

–mt

Compiles and links for multithreaded code. 

–xcode=a

(SPARC) Specifies the code address space. 

–xMerge

(SPARC) Merges the data segment with the text segment. 

–xmodel

Modifies the form of 64-bit objects for the Solaris x86 platforms 

+w

Identifies code that might have unintended consequences. 

+w2

Emits all the warnings emitted by +w plus warnings about technical violations that are probably harmless, but that might reduce the maximum portability of your program.

-xregs

The compiler can generate faster code if it has more registers available for temporary storage (scratch registers). This option makes available additional scratch registers that might not always be appropriate. 

-z arg

Linker option.