Teach cparser how to parse (f)(void);, i.e. global declarations can start with a (.
authorChristoph Mallon <christoph.mallon@gmx.de>
Fri, 14 Nov 2008 15:16:27 +0000 (15:16 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Fri, 14 Nov 2008 15:16:27 +0000 (15:16 +0000)
[r23658]

parser.c

index c7f8ae7..13f2cbb 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -10405,6 +10405,8 @@ static void parse_translation_unit(void)
                        DECLARATION_START
                        case T_IDENTIFIER:
                        case T___extension__:
+                       case '(': /* for function declarations with implicit return type and
+                                  * parenthesized declarator, i.e. (f)(void); */
                                parse_external_declaration();
                                break;