/* This is just there to prevent spurious dangling else warnings */ \ P00_BLK_START \ for (; \ !(p00_unwind_bottom && !setjmp(p00_unwind_bottom->p00_buf)) \ /* assign before we unwind all the way down */ \ || (p00_unwind_bottom->p00_returning = 1, \ /* If an unwind is possible, i.e if we are not in the outer \ frame this will stop the evaluation of the expression \ here, and unwind as side effect. Otherwise, this will \ continue normally and directly proceed with the \ return. */ \ P99_UNWIND(-p99_unwind_return), \ 1); \ ) P99_ALLOW(RETURN) return
Return from the enclosing function after unwinding all levels of nested P99_UNWIND_PROTECT.
By this you can guarantee that all eventually existing P99_PROTECT parts of enclosing P99_UNWIND_PROTECT are properly executed. This is in some similar to the guarantee of C++ to call destructors before returning from a function.
There is one important difference, though: the
You might want do something like
volatile retType myret = expr; P99_UNWIND_RETURN myret;