From: Wolfgang (Blub) Bumiller Date: Sat, 1 Dec 2012 11:36:54 +0000 (+0100) Subject: Sanity check for -Wternary-precedence X-Git-Tag: 0.1.9~144 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8188d0b9f7a5ac336e505fa70ebaff6a16b2c055;p=xonotic%2Fgmqcc.git Sanity check for -Wternary-precedence --- diff --git a/parser.c b/parser.c index 24d0fce..d2c8bff 100644 --- a/parser.c +++ b/parser.c @@ -1718,6 +1718,11 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma vec_free(sy.out); vec_free(sy.ops); DEBUGSHUNTDO(con_out("shunt done\n")); + if (vec_size(parser->pot)) { + parseerror(parser, "internal error: vec_size(parser->pot) = %lu", (unsigned long)vec_size(parser->pot)); + return NULL; + } + vec_free(parser->pot); return expr; onerr: