This documentation is archived and is not being maintained.

/Oy (Frame-Pointer Omission)


This option suppresses creation of frame pointers on the call stack. This option speeds function calls, since no frame pointers need to be set up and removed. It also frees one more register, x86 Specific >EBP on the Intel 386 or later, END x86 Specific for storing frequently used variables and subexpressions.

x86 Specific >

If your code requires EBP-based addressing, you can specify the /Oy– option after the /Ox option or use #pragma optimize with the "y" and off arguments to gain maximum optimization with EBP-based addressing. The compiler detects most situations where EBP-based addressing is required (for instance, with the _alloca and setjmp functions and with structured exception handling).

END x86 Specific

The /Ox (Full Optimization) and /O1 and /O2 (Fast Code) options imply /Oy. Specifying /Oy– after the /Ox, /O1, or /O2 option disables /Oy, whether it is explicit or implied.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
  2. Click the C/C++ folder.
  3. Click the Optimization property page.
  4. Modify the Omit Frame Pointers property.

To set this compiler option programmatically

See OmitFramePointers Property.

See Also

/O Options (Optimize Code) | Compiler Options | Setting Compiler Options