diff options
Diffstat (limited to 'gcc/cp/cp-gimplify.c')
-rw-r--r-- | gcc/cp/cp-gimplify.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index fc8c1af2d21..4ad30b98008 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -557,6 +557,16 @@ cp_gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p) ret = GS_OK; break; + case UNARY_PLUS_EXPR: + { + tree arg = TREE_OPERAND (*expr_p, 0); + tree type = TREE_TYPE (*expr_p); + *expr_p = (TREE_TYPE (arg) != type) ? fold_convert (type, arg) + : arg; + ret = GS_OK; + } + break; + default: ret = c_gimplify_expr (expr_p, pre_p, post_p); break; |