From a6c3a1daa3dbee585c0a29ca6fc388401907a78e Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sun, 16 Nov 2008 10:30:35 +0000 Subject: [PATCH] Fix r23702 and r23704. [r23705] --- parser.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/parser.c b/parser.c index 417b1e2..d5a31ad 100644 --- a/parser.c +++ b/parser.c @@ -5272,8 +5272,6 @@ static void check_labels(void) "label '%Y' used but not defined", label->base.symbol); } } - goto_first = NULL; - goto_anchor = &goto_first; if (warning.unused_label) { for (const label_statement_t *label_statement = label_first; @@ -5288,8 +5286,6 @@ static void check_labels(void) } } } - label_first = NULL; - label_anchor = &label_first; } static void warn_unused_decl(entity_t *entity, entity_t *end, @@ -5970,7 +5966,12 @@ static void parse_external_declaration(void) current_function = function; current_parent = NULL; - statement_t *const body = parse_compound_statement(false); + goto_first = NULL; + goto_anchor = &goto_first; + label_first = NULL; + label_anchor = &label_first; + + statement_t *const body = parse_compound_statement(false); function->statement = body; first_err = true; check_labels(); -- 2.20.1