]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
print an error when static is used in global scope - this is currently not being...
authorWolfgang Bumiller <blub@speed.at>
Mon, 24 Dec 2012 10:38:33 +0000 (11:38 +0100)
committerWolfgang Bumiller <blub@speed.at>
Mon, 24 Dec 2012 10:38:33 +0000 (11:38 +0100)
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) {