Fix parsing of function declarations with redundant parentheses around the declarator...
authorChristoph Mallon <christoph.mallon@gmx.de>
Sun, 14 Sep 2008 15:12:27 +0000 (15:12 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 14 Sep 2008 15:12:27 +0000 (15:12 +0000)
[r21940]

parser.c

index d25c44f..dab67a1 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -4032,8 +4032,10 @@ static construct_type_t *parse_inner_declarator(declaration_t *declaration,
                next_token();
                add_anchor_token(')');
                inner_types = parse_inner_declarator(declaration, may_be_abstract);
-               /* All later declarators only modify the return type, not declaration */
-               declaration = NULL;
+               if (inner_types != NULL) {
+                       /* All later declarators only modify the return type, not declaration */
+                       declaration = NULL;
+               }
                rem_anchor_token(')');
                expect(')');
                break;