From: Wolfgang Bumiller Date: Sat, 12 Jan 2013 09:52:18 +0000 (+0100) Subject: 'static' shouldn't be accepted in the global scope for now X-Git-Tag: before-library~301 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3429e7d0cb35b9fe696b3565c29a32f48bc62ad4;p=xonotic%2Fgmqcc.git 'static' shouldn't be accepted in the global scope for now --- diff --git a/parser.c b/parser.c index 5fa0d89..e9b368e 100644 --- a/parser.c +++ b/parser.c @@ -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;