PR c++/86678 - constexpr function with non-constant after return.
In this testcase, the call to f() can never be a constant expression, but that's not a problem because it isn't always reached by calls to g. We were wrongly rejecting this because potential_constant_expression_1 lacked the jump tracking that cxx_eval_constant_expression has. So this patch adds a simpler version of that tracking. * constexpr.c (potential_constant_expression_1): Add jump_target. (breaks): Check for BREAK_STMT. (continues): Check for CONTINUE_STMT. From-SVN: r264171
Showing
Please
register
or
sign in
to comment