From 1638cc9f019dea2d427de036d6d238afdce6fed9 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Tue, 14 Aug 2012 16:17:09 +0200 Subject: [PATCH] -Wextensions for -std=qcc: warn about missing 'local' keyword when declaring a variable without it --- parser.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.2