diff options
-rw-r--r-- | gcc/cp/call.c | 10 | ||||
-rw-r--r-- | gcc/cp/pt.c | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 3c1f9aa..0c08d18 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -605,8 +605,16 @@ build_conv (code, type, from) enum tree_code code; tree type, from; { - tree t = build1 (code, type, from); + tree t; int rank = ICS_STD_RANK (from); + + /* We can't use buidl1 here because CODE could be USER_CONV, which + takes two arguments. In that case, the caller is responsible for + filling in the second argument. */ + t = make_node (code); + TREE_TYPE (t) = type; + TREE_OPERAND (t, 0) = from; + switch (code) { case PTR_CONV: diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index e838a98..ecf201a 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -6892,10 +6892,6 @@ tsubst_copy (t, args, complain, in_decl) tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl)); case INDIRECT_REF: - case PREDECREMENT_EXPR: - case PREINCREMENT_EXPR: - case POSTDECREMENT_EXPR: - case POSTINCREMENT_EXPR: case NEGATE_EXPR: case TRUTH_NOT_EXPR: case BIT_NOT_EXPR: @@ -6948,6 +6944,10 @@ tsubst_copy (t, args, complain, in_decl) case SCOPE_REF: case DOTSTAR_EXPR: case MEMBER_REF: + case PREDECREMENT_EXPR: + case PREINCREMENT_EXPR: + case POSTDECREMENT_EXPR: + case POSTINCREMENT_EXPR: return build_nt (code, tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl), tsubst_copy (TREE_OPERAND (t, 1), args, complain, in_decl)); |