Determines whether EBP is used as a general-purpose register in optimizations.
Windows: Optimization
> Omit Frame Pointers
Linux: None
-fp: IA-32, Intel® EM64T
/Oy: IA-32
Linux: | -fp |
Windows: | /Oy /Oy- |
None
Linux: OFF Windows: ON |
On Windows* systems, EBP is used as a general-purpose register in optimizations; on Linux* systems, it is not. |
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:
For -fp: turning off optimizations with -O0
For /Oy-: turning off /O1, /O2, or /O3 optimizations
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.
Linux: -fno-omit-frame-pointer
Windows: None