@@ -747,18 +747,15 @@ static struct token *struct_union_enum_specifier(enum type type,
if (sym->symbol_list)
error_die(token->pos, "redefinition of %s", show_typename (sym));
sym->pos = *repos;
- goto end;
- }
-
- // private struct/union/enum type
- if (!match_op(token, '{')) {
+ } else if (match_op(token, '{')) {
+ // private struct/union/enum type
+ sym = alloc_symbol(token->pos, type);
+ } else {
sparse_error(token->pos, "expected declaration");
ctx->ctype.base_type = &bad_ctype;
return token;
}
- sym = alloc_symbol(token->pos, type);
-end:
set_current_scope(sym); // used by dissect
token = parse(token->next, sym);
ctx->ctype.base_type = sym;