C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Removing Stack Probes (/Gs, /Ge)
                                             Up Contents Index Back
─────C/C++ Compiler─────────────────────────────────────────────────────────
 
     Syntax:  /Gs
              /Ge
 
     Every function call contains, by default, a call to a routine
     verifying that space exists in the program stack in which to
     allocate local variables. This routine is called a stack probe.
 
     Option     Description
 
     /Gs        Removes all stack probes, which reduces the size of
                programs and speeds up execution
 
     /Ge        Enables the stack probe that is a part of every
                function call
 
     The /Gs option turns off stack checking for an entire module. If
     stack checking is disabled, the affected module must not use more
     space than is available on the program stack. Stack probes may be
     unnecessary for programs that make few function calls or that have
     only modest local-variable requirements.
 
     If you use __fastcall without /Gs, execution speed is slowed.
 
     Use the check_stack pragma to turn stack checking on or off for
     selected routines. The default (as determined by the presence or
     absence of the /Gs option) affects the rest of the program.
 
     See also: check_stack pragma
               Stack Probes
                                    -♦-