aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppdefault.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-12-03 20:27:47 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-12-03 20:27:47 +0100
commitee1de08d4d22648cf3168caa60e283135755da85 (patch)
treee083274d278bc2660e28c8e0c3930a6bb161b171 /gcc/cppdefault.c
parent21cd8589291a1b415106740acd56509e0143356d (diff)
downloadgcc-ee1de08d4d22648cf3168caa60e283135755da85.zip
gcc-ee1de08d4d22648cf3168caa60e283135755da85.tar.gz
gcc-ee1de08d4d22648cf3168caa60e283135755da85.tar.bz2
re PR c++/91369 (Implement P0784R7: constexpr new)
PR c++/91369 * constexpr.c (struct constexpr_global_ctx): Add cleanups member, initialize it in the ctor. (cxx_eval_constant_expression) <case TARGET_EXPR>: If TARGET_EXPR_SLOT is already in the values hash_map, don't evaluate it again. Put TARGET_EXPR_SLOT into hash_map even if not lval, and push it into save_exprs too. If there is TARGET_EXPR_CLEANUP and not CLEANUP_EH_ONLY, push the cleanup to cleanups vector. <case CLEANUP_POINT_EXPR>: Save outer cleanups, set cleanups to local auto_vec, after evaluating the body evaluate cleanups and restore previous cleanups. <case TRY_CATCH_EXPR>: Don't crash if the first operand is NULL_TREE. (cxx_eval_outermost_constant_expr): Set cleanups to local auto_vec, after evaluating the expression evaluate cleanups. * g++.dg/cpp2a/constexpr-new8.C: New test. From-SVN: r278945
Diffstat (limited to 'gcc/cppdefault.c')
0 files changed, 0 insertions, 0 deletions