]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/constexpr.c
PR c++/88446
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Dec 2018 08:44:27 +0000 (08:44 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Dec 2018 08:44:27 +0000 (08:44 +0000)
commit1562c83117407a25b84ae333b611202173879826
treeb608cbd81f75cde8ce4f3264c08646a15e1fb0ba
parent711fc91cd11e18ea9b17bc0a1e7a175c4a9f17f7
PR c++/88446
* cp-tree.h (maybe_constant_value): Add manifestly_const_eval
argument.
* constexpr.c (struct constexpr_call): Rename pretend_const_required
member to manifestly_const_eval.
(struct constexpr_ctx): Likewise.
(constexpr_call_hasher::equal): Adjust users.
(cxx_eval_builtin_function_call): Likewise.  Formatting fix.
(cxx_eval_call_expression): Adjust users.
(cxx_eval_outermost_constant_expr, maybe_constant_init_1,
maybe_constant_init): Rename pretend_const_required argument to
manifestly_const_eval, adjust function comments.
(maybe_constant_value): Add manifestly_const_eval argument.  If true,
don't cache and call cxx_eval_outermost_constant_expr with true as
manifestly_const_eval.
* decl.c (compute_array_index_type_loc): Call maybe_constant_value
with true as manifestly_const_eval.

* g++.dg/cpp2a/is-constant-evaluated3.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267047 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/is-constant-evaluated3.C [new file with mode: 0644]