An output failure during recursive descent
A recursive parser checks whether writing a newline failed. If `putchar('\n') == EOF`, it calls `longjmp(jmpTarget, eofOut)` instead of returning through each active call. Its outer function uses `switch (setjmp(jmpTarget))` to select an outcome, including an output-error message. section 19.5
`setjmp` establishes a target in a `jmp_buf`; `longjmp` transfers control back to that target across function-call boundaries. Unlike a `goto` label, the target need not be in the same function. `setjmp` may return more than once, while `longjmp` never returns to its caller. section 19.5 section 19.0
TAKEAWAY — keep the recovery path valid and portable:
- Use a `jmp_buf` only while it is alive and its contents are valid. section 19.5
- Place the `setjmp` macro only in expression contexts permitted by the C standard; an implementation might not diagnose an invalid placement. section 15.3.3
- Account for optimization when a long jump crosses active calls: some variables require `volatile` qualification. section 19.7
Figure 19.2 Control flow with setjmp and longjmp: longjmp jumps to the position marked by setjmp.
The control-flow figure shows the jump from `longjmp` back to the position marked by `setjmp`. section 19.5


