Add { as anchor while parsing k&r declaration list.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 17 Sep 2008 21:49:45 +0000 (21:49 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 17 Sep 2008 21:49:45 +0000 (21:49 +0000)
[r22059]

parser.c

index d05873e..68e6670 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -4760,6 +4760,8 @@ static void parse_kr_declaration_list(declaration_t *declaration)
        if (!type->function.kr_style_parameters)
                return;
 
+       add_anchor_token('{');
+
        /* push function parameters */
        int       top        = environment_top();
        scope_t  *last_scope = scope;
@@ -4838,6 +4840,8 @@ static void parse_kr_declaration_list(declaration_t *declaration)
        }
 
        declaration->type = type;
+
+       rem_anchor_token('{');
 }
 
 static bool first_err = true;