Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - #pragma stack stack check calls control http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 #pragma STACK       Stack check calls control
------------------------------------------------------------------------------
 Syntax
   #pragma STACK+|-

 Arguments
   + and - control if the option is on or off, respectively.

 Description
   The #pragma STACK directive controls the generation of stack
   checking code in the current module.

   By default the compiler generates code that checks the integrity of
   the runtime stack. The default behavior can be overridden by the
   #pragma STACK- directive. In this case stack checking code is omitted
   in the module. The #pragma STACK+ directive can be used to override
   the effect of the -Gs compiler switch.

 Example
   #define EXAMPLE_DIRECTIV
   #include example.hdr

   #define DEBUG       // results in debug version of code to be compiled
   
   #ifdef DEBUG
      #pragma STACK+   // enable stack checks in debug version
   #else
      #pragma STACK-   // disable stack checks in production version
   #endif
   
   proc Test_863
   ? "Hello world"
   endproc

   proc main
   Test_863()
   endproc

See Also: -Gs

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson