longjmp question
John Wilkinson
jfw at engr.sgi.com
Wed Sep 8 21:31:43 UTC 1999
Jim Dehnert wrote:
>
> I'll add the issue. But...
>
> Implementation is a significant issue. The normal longjmp implementation
> is very simple -- setjmp stores the register/stack state, and longjmp
> copies it back and branches. There is normally no traceback involved,
> so what you suggest is a dramatic change, and probably would make C
> people very unhappy. Furthermore, C++ users have the option of using
> C++ exceptions, which have the effect you seek.
>
> - Jim Dehnert dehnert at sgi.com
> (650)933-4272
The C++ standard, 18.7 paragraph 4, says a call to longjmp has undefined
behavior if any automatic objects would have been destroyed by a
throw/catch with the same source and destination. I don't see that
this is something we need to fix.
--
John Wilkinson
More information about the cxx-abi-dev
mailing list