mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 22:31:36 +00:00
print an error when static is used in global scope - this is currently not being handled as expected
This commit is contained in:
parent
2b468cb0ee
commit
da927b5d41
1 changed files with 3 additions and 0 deletions
3
parser.c
3
parser.c
|
@ -4015,6 +4015,9 @@ static bool parse_variable(parser_t *parser, ast_block *localblock, bool nofield
|
|||
|
||||
ast_member *me[3];
|
||||
|
||||
if (!localblock && is_static)
|
||||
parseerror(parser, "`static` qualifier is not supported in global scope");
|
||||
|
||||
/* get the first complete variable */
|
||||
var = parse_typename(parser, &basetype, cached_typedef);
|
||||
if (!var) {
|
||||
|
|
Loading…
Reference in a new issue