mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-21 23:30:59 +08:00
re PR c++/63996 (Infinite loop in invalid C++14 constexpr fn)
PR c++/63996 * constexpr.c (cxx_eval_loop_expr): Don't loop endless on none-constant expression. From-SVN: r218682
This commit is contained in:
parent
32b671f05a
commit
5a5e54cdf8
gcc/cp
@ -1,3 +1,9 @@
|
||||
2014-12-12 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
PR c++/63996
|
||||
* constexpr.c (cxx_eval_loop_expr): Don't loop
|
||||
endless on none-constant expression.
|
||||
|
||||
2014-12-12 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/61402
|
||||
|
@ -2841,7 +2841,7 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t,
|
||||
{
|
||||
cxx_eval_statement_list (ctx, body,
|
||||
non_constant_p, overflow_p, jump_target);
|
||||
if (returns (jump_target) || breaks (jump_target))
|
||||
if (returns (jump_target) || breaks (jump_target) || *non_constant_p)
|
||||
break;
|
||||
}
|
||||
if (breaks (jump_target))
|
||||
|
Loading…
x
Reference in New Issue
Block a user