On 19/05/2020 01:57, Luc Van Oostenryck wrote: > Labels declared wth __label__ are special because they must follow > the block scope normally used for variables instad of using the s/instad/instead/ > scope used for labels. > > So, use bind_symbol_scoped() instead of first using bind_symbol() s/bind_symbol_scoped/bind/symbol_with_scope/ ATB, Ramsay Jones > and then changing the namespace. > > Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> > --- > parse.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/parse.c b/parse.c > index e23c5b64e8be..29e3f939166d 100644 > --- a/parse.c > +++ b/parse.c > @@ -2569,8 +2569,7 @@ static struct token *label_statement(struct token *token) > while (token_type(token) == TOKEN_IDENT) { > struct symbol *sym = alloc_symbol(token->pos, SYM_LABEL); > /* it's block-scope, but we want label namespace */ > - bind_symbol(sym, token->ident, NS_SYMBOL); > - sym->namespace = NS_LABEL; > + bind_symbol_with_scope(sym, token->ident, NS_LABEL, block_scope); > fn_local_symbol(sym); > token = token->next; > if (!match_op(token, ',')) >