From 46e601cdf52e685ab226cdb0eac8799107b3f77e Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 2 Oct 2008 19:49:19 +0000 Subject: [PATCH] Fix assertion failure introduced in r22072. [r22422] --- parser.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/parser.c b/parser.c index 16541f0..3d864ac 100644 --- a/parser.c +++ b/parser.c @@ -842,10 +842,14 @@ static void stack_pop_to(stack_entry_t **stack_ptr, size_t new_top) break; } - /* Because of scopes and appending other namespaces to the end of - * the list, this must hold. */ - assert((old_declaration != NULL ? old_declaration->symbol_next : NULL) == iter->symbol_next); - *anchor = old_declaration; + /* Not all declarations adhere scopes (e.g. jump labels), so this + * correction is necessary */ + if (old_declaration != NULL) { + old_declaration->symbol_next = iter->symbol_next; + *anchor = old_declaration; + } else { + *anchor = iter->symbol_next; + } } ARR_SHRINKLEN(*stack_ptr, (int) new_top); -- 2.20.1