Share via


/Oy   (Frame-Pointer Omission)

OverviewHow Do ICompiler Options

Feature Only in Professional and Enterprise Editions   Code optimization is supported only in Visual C++ Professional and Enterprise Editions. For more information, see .

The /Oy 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.

To find this option in the development environment, click Settings on the Project menu. Then click the C/C++ tab, and click Optimizations in the Category box. Under Optimizations, click Customize.

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– in the Common|Project|Source File Options text box (or on the command line) after the /Ox, /O1, or /O2 option disables /Oy, whether it is explicit or implied.