Add immediate potential_constant_expression variants

Programming / Compilers / GCC - jason [138bc75d-0d04-0410-961f-82ee72b054a4] - 29 August 2017 15:40 EDT

- constexpr.c (potential_constant_expression_1): Add "now" parm. (is_constant_expression, require_constant_expression): New. (is_static_init_expression, is_nondependent_constant_expression) (is_nondependent_static_init_expression): Drop "potential".
- except.c (build_must_not_throw_expr): Do type conversion on
value-dependent argument.
- pt.c, semantics.c, typeck2.c: Use variants without "potential".

7e1f8be Add immediate potential_constant_expression variants.
gcc/cp/ChangeLog | 8 +++
gcc/cp/constexpr.c | 95 ++++++++++++++++++++--------
gcc/cp/cp-tree.h | 8 ++-
gcc/cp/except.c | 18 ++++--
gcc/cp/pt.c | 15 +++--
gcc/cp/semantics.c | 2 +-
gcc/cp/typeck2.c | 2 +-
gcc/testsuite/g++.dg/cpp0x/constexpr-conv2.C | 15 +++++
8 files changed, 120 insertions(+), 43 deletions(-)

Upstream: gcc.gnu.org


  • Share