aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r--gcc/cp/cvt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index 13bc1f7..6d4bd9a 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -687,7 +687,8 @@ ocp_convert (tree type, tree expr, int convtype, int flags,
}
/* FIXME remove when moving to c_fully_fold model. */
- e = scalar_constant_value (e);
+ if (!CLASS_TYPE_P (type))
+ e = scalar_constant_value (e);
if (error_operand_p (e))
return error_mark_node;