From: Wolfgang (Blub) Bumiller Date: Sun, 25 Nov 2012 18:44:21 +0000 (+0100) Subject: a '(void)' parameter list does not mean 1 parameter of type void, but empty... xonoti... X-Git-Tag: 0.1.9~245 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f2887f1208e27d956543929409b2be3d41549151;p=xonotic%2Fgmqcc.git a '(void)' parameter list does not mean 1 parameter of type void, but empty... xonotic needs this --- diff --git a/parser.c b/parser.c index 370f92f..197cd90 100644 --- a/parser.c +++ b/parser.c @@ -3151,6 +3151,9 @@ static ast_value *parse_parameter_list(parser_t *parser, ast_value *var) } } + if (vec_size(params) == 1 && params[0]->expression.vtype == TYPE_VOID) + vec_free(params); + /* sanity check */ if (vec_size(params) > 8 && opts_standard == COMPILER_QCC) (void)!parsewarning(parser, WARN_EXTENSIONS, "more than 8 parameters are not supported by this standard");