From: Christoph Mallon Date: Wed, 27 Aug 2008 17:38:25 +0000 (+0000) Subject: Fix parse error when parsing functions returning function pointers: The parameter... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=25732a0593e1b8b088a06840a8ac715a87ee1f9c;p=cparser Fix parse error when parsing functions returning function pointers: The parameter list of the function pointer incorrectly got associated with the function declaration overriding the parameter list of the function. [r21523] --- diff --git a/parser.c b/parser.c index 3f93c10..e702ca8 100644 --- a/parser.c +++ b/parser.c @@ -3819,6 +3819,8 @@ 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; rem_anchor_token(')'); expect(')'); break;