mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-21 18:30:52 +00:00
-Wextensions for -std=qcc: warn about missing 'local' keyword when declaring a variable without it
This commit is contained in:
parent
d96fd2d9b8
commit
1638cc9f01
1 changed files with 2 additions and 0 deletions
2
parser.c
2
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;
|
||||
|
|
Loading…
Reference in a new issue