aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1997-12-09 18:59:59 +0000
committerJason Merrill <jason@gcc.gnu.org>1997-12-09 13:59:59 -0500
commiteb291d0511b87560d898b4925a392b6978caed6d (patch)
tree68b1769f34653e0a38187528d519352f8feb3353 /gcc
parent08ce3276373459ddb1c294bfadd591cdc1ebdc67 (diff)
downloadgcc-eb291d0511b87560d898b4925a392b6978caed6d.zip
gcc-eb291d0511b87560d898b4925a392b6978caed6d.tar.gz
gcc-eb291d0511b87560d898b4925a392b6978caed6d.tar.bz2
init.c (expand_vec_init): Don't fold a list of parameters.
* init.c (expand_vec_init): Don't fold a list of parameters. Fixes kde. From-SVN: r17031
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/init.c16
2 files changed, 4 insertions, 16 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 66df1a7..0ddfaf5 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,7 @@
Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
+ * init.c (expand_vec_init): Don't fold a list of parameters.
+
* decl.c (copy_args_p): Handle copy elision for types with virtual
bases.
* call.c (build_over_call): Likewise.
@@ -5314,7 +5316,7 @@ Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
* init.c (build_new): Pedwarn about init and array new.
- (expand_vec_init): Handle lists, use convert_for_initialization
+ (expand_vec_init): Handle lists, use convert_for_initialization.
* typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
when converting to an aggregate type.
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 2ad20ff..87c8e8c 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -3036,9 +3036,6 @@ expand_vec_init (decl, base, maxindex, init, from_array)
expand_assignment (rval, base, 0, 0);
base = get_temp_regvar (build_pointer_type (type), base);
- if (init != NULL_TREE && TREE_CODE (init) == TREE_LIST)
- init = build_compound_expr (init);
-
if (init != NULL_TREE
&& TREE_CODE (init) == CONSTRUCTOR
&& (! decl || TREE_TYPE (init) == TREE_TYPE (decl)))
@@ -3154,18 +3151,7 @@ expand_vec_init (decl, base, maxindex, init, from_array)
array_type_nelts (type), 0, 0);
}
else
- {
- tree targ = build1 (INDIRECT_REF, type, base);
- tree rhs;
-
- if (init)
- rhs = convert_for_initialization (targ, type, init, LOOKUP_NORMAL,
- "initialization", NULL_TREE, 0);
- else
- rhs = NULL_TREE;
-
- expand_aggr_init (targ, rhs, 0, 0);
- }
+ expand_aggr_init (build1 (INDIRECT_REF, type, base), init, 0, 0);
expand_assignment (base,
build (PLUS_EXPR, build_pointer_type (type), base, size),