]> git.ipfire.org Git - thirdparty/gcc.git/commit
Handle C++14 constexpr flow control.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Nov 2014 19:08:07 +0000 (19:08 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Nov 2014 19:08:07 +0000 (19:08 +0000)
commit00f2171561b1524f9b683b3361545469ea6c94aa
tree73dc149a26c6bd49aa72590cac53a322919a5295
parente6f10d79d87c088a03dd9641058135c77ffd07da
Handle C++14 constexpr flow control.
* constexpr.c (cxx_eval_loop_expr, cxx_eval_switch_expr): New.
(cxx_eval_statement_list): New.
(cxx_eval_constant_expression): Handle LABEL_EXPR,
CASE_LABEL_EXPR, GOTO_EXPR, LOOP_EXPR, SWITCH_EXPR.  Handle jump
semantics of RETURN_EXPR.
(many functions): Add jump_target parameter.
(returns, breaks, continues, switches, label_matches): New.
* cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): New.
* cp-gimplify.c (begin_bc_block): Set them.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217670 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-gimplify.c
gcc/cp/cp-tree.h
gcc/testsuite/g++.dg/cpp1y/constexpr-loop1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-return1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-return2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-switch1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-switch2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-switch3.C [new file with mode: 0644]