]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - parser.c
print an error when static is used in global scope - this is currently not being...
[xonotic/gmqcc.git] / parser.c
index c8c6fb33beb067050b77ac6365d44d90c2a3830e..4058a8f99b042c349cfa54fa3aa89717121a2fb3 100644 (file)
--- a/parser.c
+++ b/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) {