From: Wolfgang Bumiller Date: Sat, 12 Jan 2013 09:57:44 +0000 (+0100) Subject: keep track of the highest parameter count of calls for later for varargs X-Git-Tag: before-library~300 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2f9db8972ee0c8cd5f491f47d79a283c8d72c7aa;p=xonotic%2Fgmqcc.git keep track of the highest parameter count of calls for later for varargs --- diff --git a/parser.c b/parser.c index e9b368e..2e16853 100644 --- a/parser.c +++ b/parser.c @@ -100,6 +100,9 @@ typedef struct { /* pragma flags */ bool noref; + + /* collected information */ + size_t max_param_count; } parser_t; static const ast_expression *intrinsic_debug_typestring = (ast_expression*)0x10; @@ -1403,6 +1406,8 @@ static bool parser_close_call(parser_t *parser, shunt *sy) params->exprs = NULL; ast_delete(params); } + if (parser->max_param_count < paramcount) + parser->max_param_count = paramcount; (void)!ast_call_check_types(call); } else { parseerror(parser, "invalid function call");