Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Gs

Lets you control the threshold at which the stack checking routine is called or not called.

Syntax

Linux:

None

Windows:

/Gs[n]

Arguments

n

Is the number of bytes that local variables and compiler temporaries can occupy before stack checking is activated. This is called the threshold.

Default

/Gs

Stack checking occurs for routines that require more than 4KB (4096 bytes) of stack space. This is also the default if you do not specify n.

Description

This option lets you control the threshold at which the stack checking routine is called or not called. If a routine's local stack allocation exceeds the threshold (n), the compiler inserts a __chkstk() call into the prologue of the routine.

NOTE:

This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation.

IDE Equivalent

None

Alternate Options

None