From 3429e7d0cb35b9fe696b3565c29a32f48bc62ad4 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Sat, 12 Jan 2013 10:52:18 +0100 Subject: [PATCH] 'static' shouldn't be accepted in the global scope for now --- parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2