static ms_try_statement_t *current_try = NULL;
static linkage_kind_t current_linkage = LINKAGE_INVALID;
static goto_statement_t *goto_first = NULL;
-static goto_statement_t *goto_last = NULL;
+static goto_statement_t **goto_anchor = NULL;
static label_statement_t *label_first = NULL;
static label_statement_t **label_anchor = NULL;
/** current translation unit. */
"label '%Y' used but not defined", label->base.symbol);
}
}
- goto_first = NULL;
- goto_last = NULL;
+ goto_first = NULL;
+ goto_anchor = &goto_first;
if (warning.unused_label) {
for (const label_statement_t *label_statement = label_first;
expression_t *expression = parse_expression();
mark_vars_read(expression, NULL);
- /* Argh: although documentation say the expression must be of type void *,
- * gcc excepts anything that can be casted into void * without error */
+ /* Argh: although documentation says the expression must be of type void*,
+ * gcc accepts anything that can be casted into void* without error */
type_t *type = expression->base.type;
if (type != type_error_type) {
}
/* remember the goto's in a list for later checking */
- if (goto_last == NULL) {
- goto_first = &statement->gotos;
- } else {
- goto_last->next = &statement->gotos;
- }
- goto_last = &statement->gotos;
+ *goto_anchor = &statement->gotos;
+ goto_anchor = &statement->gotos.next;
expect(';');