]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/ChangeLog
PR c++/89785
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Mar 2019 14:47:47 +0000 (14:47 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Mar 2019 14:47:47 +0000 (14:47 +0000)
commitad6978a67240c6acbcfe4076e5c233d07e6101a1
treebbbb8cc67962bc2f9a803fcc432f20ac3ff2e284
parent2c151736b99bf4bc3902244fb61ff5300e38ae62
PR c++/89785
* constexpr.c (struct check_for_return_continue_data): New type.
(check_for_return_continue): New function.
(potential_constant_expression_1) <case SWITCH_STMT>: Walk
SWITCH_STMT_BODY to find RETURN_EXPRs or CONTINUE_STMTs not nested
in loop bodies and set *jump_target to that if found.

* g++.dg/cpp1y/constexpr-89785-1.C: New test.
* g++.dg/cpp1y/constexpr-89785-2.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269995 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/constexpr-89785-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-89785-2.C [new file with mode: 0644]