Commit 3ebcc97e authored by Jens Gustedt's avatar Jens Gustedt
Browse files

gcc is becoming too smart

It seems that it now figures well out that the switch in
P99_UNWIND_PROTECT is Boolean, and then makes some noise about
unreachable code. Retire this mechanism.
parent 595c66c6
......@@ -647,19 +647,7 @@ P00_BLK_DECL_REC(register p00_jmp_buf *const, p00_unwind_bottom,
P00_BLK_END \
/* force interpretation of the setjmp return to 0 or 1, and ensure \
that it occurs in a context where it is permitted. */ \
switch (!setjmp(p00_unwind_top[0].p00_buf)) \
if (0) { \
\
/* The switch expression of the surrounding switch from \
P99_UNWIND_PROTECT should only have values true and false. So \
this default label can only trigger if there is no "case 0". It \
is also here to ensure that no other "default" label is placed on \
the same level of "switch" by error. */ \
default: \
p00_code = p00_unwind_top[0].p00_code; \
p00_unw = !!p00_code; \
} else \
case 1:
switch (!setjmp(p00_unwind_top[0].p00_buf)) case 1:
p99_inline
void p00_unwind(void* p00_top, unsigned p00_level, int p00_cond) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment