fomit-frame-pointer, Oy
, Oy
Determines whether EBP is used as a
general-purpose register in optimizations.
Architecture Restrictions
Option
/Oy[-]
is only available
on IA-32 architecture. IA-32 architecture is only supported for C++.
Syntax
Linux:
-fomit-frame-pointer
-fno-omit-frame-pointer
Windows:
/Oy
(C++
only)
/Oy-
(C++
only)
Arguments
None
Default
- -fomit-frame-pointerC++: or/Oy
- EBP is used as a general-purpose register in optimizations. However, on Linux* systems, the default is-fno-omit-frame-pointerif option-O0or-gis specified.C++: On Windows* systems, the default is/Oy-if option/Odis specified.
Description
These options determine whether EBP is used as a
general-purpose register in optimizations. Option
-fomit-frame-pointer
and option
allows this
use. Option
/Oy
-fno-omit-frame-pointer
and option
disallows it.
/Oy-
Some debuggers expect EBP to be used as a stack frame
pointer, and cannot produce a stack backtrace unless this is so. The
-fno-omit-frame-pointer
and the
option
directs 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:
/Oy-
- For-fno-omit-frame-pointer: turning off optimizations with-O0
- This content is specific to C++; it does not apply toDPC++.For/Oy-: turning off/O1,/O2, or/O3optimizations
The
-fno-omit-frame-pointer
option is set when you specify option
-O0
or the
-g
option. The
-fomit-frame-pointer
option is set when you specify option
-O1
,
-O2
, or
-O3
.
This content is specific to C++; it does not apply to
The
DPC++
./Oy
option is set when
you specify the
/O1
,
/O2
, or
/O3
option. Option
/Oy-
is set when you
specify the
/Od
option.
Using the
-fno-omit-frame-pointer
or
option
reduces the number of available general-purpose registers by 1, and can result
in slightly less efficient code.
/Oy-
For Linux* systems:
There is currently an issue with GCC 3.2 exception
handling. Therefore, the compiler ignores this option when GCC 3.2 is installed
for C++ and exception handling is turned on (the default).
IDE Equivalent
Visual Studio:
Optimization > Omit
Frame Pointers
Eclipse:
Optimization > Provide
Frame Pointer
Alternate Options
Linux:
-fp
(this is a deprecated
option)
Windows:
None