From 681bd6f4b2f2bed1acc3ab75fb6581f2b3f1e30b Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 22 Dec 2012 19:22:08 +0900 Subject: [PATCH] Don't try to emit code if there have been errors. The expression tree can't really be trusted if there have been errors. While warnings as errors are another matter, it's not worth sorting out. --- tools/qfcc/source/function.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/qfcc/source/function.c b/tools/qfcc/source/function.c index 2d38a1442..5b0d7d19c 100644 --- a/tools/qfcc/source/function.c +++ b/tools/qfcc/source/function.c @@ -646,6 +646,8 @@ finish_function (function_t *f) void emit_function (function_t *f, expr_t *e) { + if (pr.error_count) + return; f->code = pr.code->size; lineno_base = f->def->line; f->sblock = make_statements (e);