From 76b21ad1925b935a18ca272633dbb067e8993a4a Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sat, 10 Nov 2012 12:02:15 +0100 Subject: [PATCH] -std=qcc now errors on C-style function syntax --- parser.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.39.2