diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-03-28 15:47:47 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-03-28 15:47:47 +0100 |
commit | c7a53bdbb164f5a216f13801c1abbaa8c08c81f1 (patch) | |
tree | bbbb8cc67962bc2f9a803fcc432f20ac3ff2e284 /gcc/tree-inline.h | |
parent | 12b9247b19b8b634ec467ba8a3f506a4e7b76711 (diff) | |
download | gcc-c7a53bdbb164f5a216f13801c1abbaa8c08c81f1.zip gcc-c7a53bdbb164f5a216f13801c1abbaa8c08c81f1.tar.gz gcc-c7a53bdbb164f5a216f13801c1abbaa8c08c81f1.tar.bz2 |
re PR c++/89785 (Incorrect "not a constant expression" error with switch statement that returns)
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.
From-SVN: r269995
Diffstat (limited to 'gcc/tree-inline.h')
0 files changed, 0 insertions, 0 deletions