fp, Oy

Determines whether EBP is used as a general-purpose register in optimizations.

IDE Equivalent

Windows: Optimization > Omit Frame Pointers
Linux: None

Architectures

-fp: IA-32, Intel® EM64T

/Oy: IA-32

Syntax

Linux: -fp
Windows:  /Oy
/Oy-

Arguments

None

Default

Linux: OFF
Windows: ON
On Windows* systems, EBP is used as a general-purpose register in optimizations; on Linux* systems, it is not.

Description

Option -fp disallows, while option /Oy allows, use of EBP as a general-purpose register in optimizations.  

Some debuggers expect EBP to be used as a stack frame pointer, and cannot produce a stack backtrace unless this is so. The -fp and /Oy- options disallow the use of the EBP register in optimizations and direct the compiler to generate code that maintains and uses EBP as a stack frame pointer for all functions so that a debugger can still produce a stack backtrace without doing the following:

The -fp option is set when you specify the -O0 option. On IA-32 systems, it is also set when you specify the -g option. If you specify the -O1, -O2, or -O3 option, -fp is OFF.

The /Oy option is set when you specify the /O1, /O2, or /O3 option. If you specify the /Od option, /Oy is OFF.

Using the -fp or /Oy option reduces the number of available general-purpose registers by 1, and can result in slightly less efficient code.

Alternate Options

Linux: -fno-omit-frame-pointer
Windows: None