diff options
author | Jason Merrill <jason@redhat.com> | 2011-10-11 13:53:07 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-10-11 13:53:07 -0400 |
commit | a4474a3854f4fec4bfccad91706f95a6737e6a79 (patch) | |
tree | 473b4642325a93846dad0753e76e9aebf4091fc9 /gcc/cp/semantics.c | |
parent | 816e239ae16481accfae7b85359dc6ebce1dd97b (diff) | |
download | gcc-a4474a3854f4fec4bfccad91706f95a6737e6a79.zip gcc-a4474a3854f4fec4bfccad91706f95a6737e6a79.tar.gz gcc-a4474a3854f4fec4bfccad91706f95a6737e6a79.tar.bz2 |
re PR c++/49855 (internal compiler error: in fold_convert_const_int_from_real)
PR c++/49855
PR c++/49896
* cp-tree.def (IMPLICIT_CONV_EXPR): New.
* call.c (perform_implicit_conversion_flags): Build it
instead of NOP_EXPR.
* cp-objcp-common.c (cp_common_init_ts): It's typed.
* cxx-pretty-print.c (pp_cxx_cast_expression): Handle it.
(pp_cxx_expression): Likewise.
* error.c (dump_expr): Likewise.
* semantics.c (potential_constant_expression_1): Likewise.
* tree.c (cp_tree_equal): Likewise.
(cp_walk_subtrees): Likewise.
* pt.c (iterative_hash_template_arg): Likewise.
(for_each_template_parm_r): Likewise.
(type_dependent_expression_p): Likewise.
(tsubst_copy, tsubst_copy_and_build): Handle IMPLICIT_CONV_EXPR
and CONVERT_EXPR.
* cp-tree.h (IMPLICIT_CONV_EXPR_DIRECT_INIT): New.
From-SVN: r179813
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 7ad1e8d..189c13a 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -7481,8 +7481,6 @@ cxx_eval_constant_expression (const constexpr_call *call, tree t, return t; case LAMBDA_EXPR: - case DYNAMIC_CAST_EXPR: - case PSEUDO_DTOR_EXPR: case PREINCREMENT_EXPR: case POSTINCREMENT_EXPR: case PREDECREMENT_EXPR: @@ -8023,6 +8021,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags) case CONST_CAST_EXPR: case STATIC_CAST_EXPR: case REINTERPRET_CAST_EXPR: + case IMPLICIT_CONV_EXPR: return (potential_constant_expression_1 (TREE_OPERAND (t, 0), TREE_CODE (TREE_TYPE (t)) != REFERENCE_TYPE, flags)); |