From: Wolfgang Bumiller Date: Mon, 24 Dec 2012 10:38:33 +0000 (+0100) Subject: print an error when static is used in global scope - this is currently not being... X-Git-Tag: before-library~504 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=da927b5d411f6503f969e7d2f46174fdf907c577;p=xonotic%2Fgmqcc.git print an error when static is used in global scope - this is currently not being handled as expected --- diff --git a/parser.c b/parser.c index c8c6fb3..4058a8f 100644 --- 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) {