Function unwinding at runtime
By default, functions compiled with
be unwound at runtime. Function unwinding includes
destroying C++ automatic variables, and restoring register values
saved in the stack frame. Function unwinding is implemented by emitting
an exception table describing the operations to be performed.
You can enable or disable unwinding for specific functions
with the pragmas
#pragma exceptions_unwind and
sets the initial value of this pragma.
Disabling function unwinding for a function has the following
Exceptions cannot be thrown
through that function at runtime, and no stack unwinding occurs
for that throw. If the throwing language is C++, then
The exception table representation that describes
the function is very compact. This assists smart linkers with table
Function inlining is restricted, because the caller
and callee must interact correctly.
#pragma no_exceptions_unwind lets
you forcibly prevent unwinding in a way that requires no additional
By contrast, in C++ an empty function exception specification
permits unwinding as far as the protected function, then calls
accordance with the ISO C++ Standard.