a '(void)' parameter list does not mean 1 parameter of type void, but empty... xonotic needs this

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-25 19:44:21 +01:00
parent b59401db1b
commit f2887f1208

View file

@ -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 */ /* sanity check */
if (vec_size(params) > 8 && opts_standard == COMPILER_QCC) if (vec_size(params) > 8 && opts_standard == COMPILER_QCC)
(void)!parsewarning(parser, WARN_EXTENSIONS, "more than 8 parameters are not supported by this standard"); (void)!parsewarning(parser, WARN_EXTENSIONS, "more than 8 parameters are not supported by this standard");