From: Wolfgang (Blub) Bumiller Date: Sat, 10 Nov 2012 11:02:15 +0000 (+0100) Subject: -std=qcc now errors on C-style function syntax X-Git-Tag: 0.1~19^2~54 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=76b21ad1925b935a18ca272633dbb067e8993a4a;p=xonotic%2Fgmqcc.git -std=qcc now errors on C-style function syntax --- diff --git a/parser.c b/parser.c index 53e1ffb..c02bd41 100644 --- a/parser.c +++ b/parser.c @@ -2333,6 +2333,8 @@ static ast_value *parse_typename(parser_t *parser, ast_value **storebase) } /* now there may be function parens again */ + if (parser->tok == '(' && opts_standard == COMPILER_QCC) + parseerror(parser, "C-style function syntax is not allowed in -std=qcc"); while (parser->tok == '(') { var = parse_parameter_list(parser, var); if (!var) { @@ -2388,6 +2390,8 @@ static bool parse_variable(parser_t *parser, ast_block *localblock) /* Part 0: finish the type */ while (parser->tok == '(') { + if (opts_standard == COMPILER_QCC) + parseerror(parser, "C-style function syntax is not allowed in -std=qcc"); var = parse_parameter_list(parser, var); if (!var) { retval = false;