From: Wolfgang (Blub) Bumiller Date: Tue, 14 Aug 2012 14:17:09 +0000 (+0200) Subject: -Wextensions for -std=qcc: warn about missing 'local' keyword when declaring a variab... X-Git-Tag: 0.1-rc1~306 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1638cc9f019dea2d427de036d6d238afdce6fed9;p=xonotic%2Fgmqcc.git -Wextensions for -std=qcc: warn about missing 'local' keyword when declaring a variable without it --- diff --git a/parser.c b/parser.c index 60857df..4bf1534 100644 --- 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;