diff options
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/gcc/elna-generic.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/gcc/elna-generic.cc b/gcc/gcc/elna-generic.cc index fb68136..b786688 100644 --- a/gcc/gcc/elna-generic.cc +++ b/gcc/gcc/elna-generic.cc @@ -891,22 +891,22 @@ namespace elna::gcc void generic_visitor::visit(boot::repeat_statement *statement) { - enter_scope(); tree loop_label = create_artificial_label(get_location(&statement->position())); tree goto_loop = build1(GOTO_EXPR, void_type_node, loop_label); append_statement(build1(LABEL_EXPR, void_type_node, loop_label)); - for (auto *body_statement : statement->body) - { - body_statement->accept(this); - } + enter_scope(); + visit_statements(statement->body); + + tree repeat_binding = leave_scope(); + append_statement(repeat_binding); + statement->condition().accept(this); tree condition_statement = build3(COND_EXPR, void_type_node, this->current_expression, NULL_TREE, goto_loop); - append_statement(condition_statement); - tree repeat_binding = leave_scope(); - append_statement(repeat_binding); + append_statement(condition_statement); + this->current_expression = NULL_TREE; } void generic_visitor::visit(boot::for_statement *statement) |
