Sun Studio 12 Update 1: C User's Guide

B.2.84 -xcheck[=o]

Add runtime checks for stack overflow and initialize local variables.

You can substitute one of the following values for o:

Table B–19 The -xcheck Flags

Flag  

Meaning  

%none

Perform none of the -xcheck checks.

%all

Perform all of the -xcheck checks.

stkovf

Turns on stack-overflow checking.-xcheck=stkovf adds a runtime check for stack overflow of the main thread in a singly-threaded program as well as slave-thread stacks in a multithreaded program. If a stack overflow is detected, a SIGSEGV is generated. If your application needs to handle a SIGSEGV caused by a stack overflow differently than it handles other address-space violations, see sigaltstack(2).

no%stkovf

Turns off stack-overflow checking. 

init_local

Initialize local variables. 

no%init_local

Do not initialize local variables. 

If you do not specify -xcheck, the compiler defaults to-xcheck=%none. If you specify -xcheck without any arguments, the compiler defaults to-xcheck=%all.

The -xcheck option does not accumulate on the command line. The compiler sets the flag in accordance with the last occurrence of the command.