From 319f547467938026dd3ff49d224ecd8198af5f7d Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 30 Apr 2015 11:14:54 -0700 Subject: clarify setjmp/longjmp limitations when implemented using exceptions --- EssentialPostV1Features.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'EssentialPostV1Features.md') diff --git a/EssentialPostV1Features.md b/EssentialPostV1Features.md index 455cfa6..90e2885 100644 --- a/EssentialPostV1Features.md +++ b/EssentialPostV1Features.md @@ -23,8 +23,13 @@ in [future versions](FutureFeatures.md). ## Zero-cost Exception Handling * Developer access to stack unwinding and inspection. -* This will be used to implement `setjmp`/`longjmp` (instead of the usual - opposite approach). +* This may be used to implement `setjmp`/`longjmp` (instead of the usual + opposite approach). This can enable all of the defined behavior of + `setjmp`/`longjmp`, namely unwinding the stack, but does not allow + the undefined behavior case of jumping forward to a stack that + was already unwound (which is sometimes used to implement coroutines; + however, explicit coroutine support is being considered separately + anyhow). ## Signature-restricted Proper Tail Calls * This can also be used to support `goto` and irreducible control flow. -- cgit v1.2.3