aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/typeck2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r--gcc/cp/typeck2.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index adbe9de..53e2202 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -703,23 +703,8 @@ digest_init (tree type, tree init)
/* Handle scalar types (including conversions) and references. */
if (TREE_CODE (type) != COMPLEX_TYPE
&& (SCALAR_TYPE_P (type) || code == REFERENCE_TYPE))
- {
- tree *exp;
-
- init = convert_for_initialization (0, type, init, LOOKUP_NORMAL,
- "initialization", NULL_TREE, 0);
- exp = &init;
-
- /* Skip any conversions since we'll be outputting the underlying
- constant. */
- while (TREE_CODE (*exp) == NOP_EXPR || TREE_CODE (*exp) == CONVERT_EXPR
- || TREE_CODE (*exp) == NON_LVALUE_EXPR)
- exp = &TREE_OPERAND (*exp, 0);
-
- *exp = cplus_expand_constant (*exp);
-
- return init;
- }
+ return convert_for_initialization (0, type, init, LOOKUP_NORMAL,
+ "initialization", NULL_TREE, 0);
/* Come here only for aggregates: records, arrays, unions, complex numbers
and vectors. */