'static' shouldn't be accepted in the global scope for now

This commit is contained in:
Wolfgang Bumiller 2013-01-12 10:52:18 +01:00
parent 30eac57199
commit 3429e7d0cb

View file

@ -2750,7 +2750,7 @@ static bool parse_qualifiers(parser_t *parser, bool with_local, int *cvq, bool *
else if (!strcmp(parser_tokval(parser), "deprecated") && !(flags & AST_FLAG_DEPRECATED)) {
flags |= AST_FLAG_DEPRECATED;
*message = NULL;
if (!parser_next(parser)) {
parseerror(parser, "parse error in attribute");
goto argerr;
@ -2803,7 +2803,7 @@ static bool parse_qualifiers(parser_t *parser, bool with_local, int *cvq, bool *
}
}
}
else if (!strcmp(parser_tokval(parser), "static"))
else if (with_local && !strcmp(parser_tokval(parser), "static"))
had_static = true;
else if (!strcmp(parser_tokval(parser), "const"))
had_const = true;