From: Wolfgang (Blub) Bumiller Date: Tue, 14 Aug 2012 14:59:14 +0000 (+0200) Subject: another -Wextensions situation: -std=qcc has no for loops X-Git-Tag: 0.1-rc1~297 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ca1c9b921d25c84aee49953f06c3fd0736f474b1;p=xonotic%2Fgmqcc.git another -Wextensions situation: -std=qcc has no for loops --- diff --git a/parser.c b/parser.c index 6330b79..c211746 100644 --- 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");