https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89785

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #6)
> Another option, slightly more involved, is say cp_walk_tree on
> SWITCH_STMT_BODY, looking for any RETURN_EXPRs or CONTINUE_STMTs (the latter
> only when not nested inside of a FOR_STMT, DO_STMT, WHILE_STMT and
> RANGE_FOR_STMT) and if we find a RETURN_EXPR, set jump_target to that, if we
> don't, but find a CONTINUE_STMT not nested in further looping constructs,
> set *jump_target to that CONTINUE_STMT, otherwise keep it unchanged.  To me
> this looks like the best approach for now.

I agree.

Reply via email to