From bf92df408b5fef01d5ee065b02c1deb7e4289a5b Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Wed, 29 Jun 2011 09:18:27 +0200 Subject: [PATCH] Consistently use PUSH_PARENT()/POP_PARENT(). This corrects having the wrong parent after parsing an inner function. --- parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser.c b/parser.c index f9220f0..2bbdbf4 100644 --- a/parser.c +++ b/parser.c @@ -5491,7 +5491,7 @@ static void parse_external_declaration(void) entity_t *old_current_entity = current_entity; current_function = function; current_entity = entity; - current_parent = NULL; + PUSH_PARENT(NULL); goto_first = NULL; goto_anchor = &goto_first; @@ -5517,7 +5517,7 @@ static void parse_external_declaration(void) } } - assert(current_parent == NULL); + POP_PARENT(); assert(current_function == function); assert(current_entity == entity); current_entity = old_current_entity; -- 2.20.1