]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
-std=qcc now warns about variadic functions via -Wextensions
authorWolfgang (Blub) Bumiller <blub@speed.at>
Thu, 23 Aug 2012 09:33:50 +0000 (11:33 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Thu, 23 Aug 2012 09:33:50 +0000 (11:33 +0200)
parser.c

index 79b1d40dca344f799ee8a5d0fa15016e8d4ee381..077302633c8cd9a8c46d1e3f56c5c5d9d96649fc 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -343,6 +343,10 @@ static ast_value *parser_parse_type(parser_t *parser, int basetype, bool *isfunc
                     parseerror(parser, "`...` must be the last parameter of a variadic function declaration");
                     goto on_error;
                 }
+                if (opts_standard == COMPILER_QCC) {
+                    if (parsewarning(parser, WARN_EXTENSIONS, "variadic functions are not available in this standard"))
+                        goto on_error;
+                }
                 break;
             }