On 11/18/2011 02:29 PM, Paolo Carlini wrote:
On 11/18/2011 02:27 PM, Paolo Carlini wrote:
On 11/18/2011 02:16 PM, Jason Merrill wrote:
On 11/17/2011 06:52 PM, Paolo Carlini wrote:
The problem is, in all these tests,
value is always a FIX_TRUNC_EXPR, which, AFAICS, is always left
untouched.
Aha, I guess tsubst_copy_and_build needs to handle FIX_TRUNC_EXPR
better.
I see. Maybe better if you handle this issue, I have very little
clues about the right way to do that, see, in the whole cp/ I count
only try occurrences of FIX_TRUNC_EXPR overall ;)
I meant 4, including one in error.c. You see my point.
Well, unless there are hopes that something as simple as the attached is
all there is to it: works for the testcase, but I haven't run the
testsuite...
Paolo.
////////////////
Index: pt.c
===================================================================
--- pt.c (revision 181474)
+++ pt.c (working copy)
@@ -13384,6 +13384,7 @@ tsubst_copy_and_build (tree t,
case UNARY_PLUS_EXPR: /* Unary + */
case REALPART_EXPR:
case IMAGPART_EXPR:
+ case FIX_TRUNC_EXPR:
return build_x_unary_op (TREE_CODE (t), RECUR (TREE_OPERAND (t, 0)),
complain);
Index: call.c
===================================================================
--- call.c (revision 181474)
+++ call.c (working copy)
@@ -5227,6 +5227,7 @@ build_new_op_1 (enum tree_code code, int flags, tr
case REALPART_EXPR:
case IMAGPART_EXPR:
case ABS_EXPR:
+ case FIX_TRUNC_EXPR:
return cp_build_unary_op (code, arg1, candidates != 0, complain);
case ARRAY_REF: