diff options
Diffstat (limited to 'gencode.c')
-rw-r--r-- | gencode.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -927,12 +927,19 @@ merge(struct block *b0, struct block *b1) *p = b1; } -void +int finish_parse(compiler_state_t *cstate, struct block *p) { struct block *ppi_dlt_check; /* + * Catch errors reported by us and routines below us, and return -1 + * on an error. + */ + if (setjmp(cstate->top_ctx)) + return (-1); + + /* * Insert before the statements of the first (root) block any * statements needed to load the lengths of any variable-length * headers into registers. @@ -974,6 +981,7 @@ finish_parse(compiler_state_t *cstate, struct block *p) p->sense = !p->sense; backpatch(p, gen_retblk(cstate, 0)); cstate->ic.root = p->head; + return (0); } void |