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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The instantiation of the expansion stmt turns the break/continue stmts into
GOTO_EXPRs to the artificial labels at the right spots.  The labels are marked
with LABEL_DECL_BREAK/LABEL_DECL_CONTINUE flags, otherwise constant evaluation
would reject such gotos.
That means the breaks or continues predicate are true when we reach those
GOTO_EXPRs.
Those are handled by skipping anything until we reach breaks/continues in
cxx_eval_loop_expr or breaks in cxx_eval_switch_expr.
So, either we need some different flag and handle the expansion stmt
break/continue differently or e.g. could add artificial do { } while (0);
around.

Reply via email to