]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
another -Wextensions situation: -std=qcc has no for loops
authorWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 14 Aug 2012 14:59:14 +0000 (16:59 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 14 Aug 2012 14:59:14 +0000 (16:59 +0200)
parser.c

index 6330b79cd41e734c9817d3156314c04205209d80..c2117468095da864b99429d9199cf31247ca431a 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1378,6 +1378,10 @@ static bool parser_parse_statement(parser_t *parser, ast_block *block, ast_expre
         }
         else if (!strcmp(parser_tokval(parser), "for"))
         {
+            if (opts_standard == COMPILER_QCC) {
+                if (parsewarning(parser, WARN_EXTENSIONS, "there's no for-loop in -std=qcc"))
+                    return false;
+            }
             return parser_parse_for(parser, block, out);
         }
         parseerror(parser, "Unexpected keyword");