]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
a '(void)' parameter list does not mean 1 parameter of type void, but empty... xonoti...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 18:44:21 +0000 (19:44 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 18:44:21 +0000 (19:44 +0100)
parser.c

index 370f92fab6ec39b34e9412fd4df87de7ab1baf8d..197cd9003f265e623fe188690db9bd4ba3536e61 100644 (file)
--- 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");