]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
-Wextensions for -std=qcc: warn about missing 'local' keyword when declaring a variab...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 14 Aug 2012 14:17:09 +0000 (16:17 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 14 Aug 2012 14:17:09 +0000 (16:17 +0200)
parser.c

index 60857df4a239fb8f848cc89661aaba087fe45892..4bf1534edbef2ad39b0a7bc67a2bf11756521dac 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1235,6 +1235,8 @@ static bool parser_parse_statement(parser_t *parser, ast_block *block, ast_expre
             parseerror(parser, "cannot declare a variable from here");
             return false;
         }
+        if (opts_standard == COMPILER_QCC)
+            parsewarning(parser, WARN_EXTENSIONS, "missing 'local' keyword when declaring a local variable");
         if (!parser_variable(parser, block))
             return false;
         *out = NULL;