print an error when static is used in global scope - this is currently not being handled as expected

This commit is contained in:
Wolfgang Bumiller 2012-12-24 11:38:33 +01:00
parent 2b468cb0ee
commit da927b5d41

View file

@ -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) {