Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Visual C++
Compiler Options
 /Oy (Frame-Pointer Omission)
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual C++ Compiler Options
/Oy (Frame-Pointer Omission)

Updated: November 2007

Suppresses creation of frame pointers on the call stack.

/Oy[-]

This option speeds function calls, because no frame pointers need to be set up and removed. It also frees one more register, (EBP on the Intel 386 or later) for storing frequently used variables and sub-expressions.

/Oy enables frame-pointer omission and /Oy- disables omission. /Oy is available only in x86 compilers.

If your code requires EBP-based addressing, you can specify the /Oy– option after the /Ox option or use 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).

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

The /Oy compiler option makes using the debugger more difficult because the compiler suppresses frame pointer information. If you specify a debug complier option (/Z7, /Zi, /ZI), we recommend that you specify the /Oy- option after any other optimization compiler options.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.

  2. Click the C/C++ folder.

  3. Click the Optimization property page.

  4. Modify the Omit Frame Pointers property. This property adds or removes only the /Oy option. If you want to add the /Oy- option, click Command Line and modify Additional options.

To set this compiler option programmatically

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker