|
|
|
|
|
by gumby
884 days ago
|
|
longjmp simply restores the machine registers (including PC and SP) and thus doesn’t respect any sort of unwind-protect, a concept unknown in C. unwind-protect is a more general form of the c++ raii (in fact c++ got raii from Common Lisp). |
|
I think that MSVC++ longjmp actually does proper unwinding, calling destructors in C++ functions on the stack, but don't quote me on that. I think it is also dependent on the compiler flags.