From: Jason Merrill Date: Wed, 8 Mar 2000 15:56:16 +0000 (+0000) Subject: typeck2.c (process_init_constructor): Set TREE_PURPOSE of array CONSTRUCTOR elements. X-Git-Tag: prereleases/libstdc++-2.92~7798 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=967561999ccb9c46f692b62ee7b83ce1e099ca2a;p=thirdparty%2Fgcc.git typeck2.c (process_init_constructor): Set TREE_PURPOSE of array CONSTRUCTOR elements. * typeck2.c (process_init_constructor): Set TREE_PURPOSE of array CONSTRUCTOR elements. Don't use expr_tree_cons. From-SVN: r32422 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c4af8f9e40bc..1fe2948e8854 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2000-03-08 Jason Merrill + + * typeck2.c (process_init_constructor): Set TREE_PURPOSE of + array CONSTRUCTOR elements. Don't use expr_tree_cons. + 2000-03-08 Nathan Sidwell * decl.c (cp_make_fname_decl): New function. diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 9c1a33e95c3a..e3614d7302c6 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -811,7 +811,7 @@ process_init_constructor (type, init, elts) allconstant = 0; else if (! initializer_constant_valid_p (next1, TREE_TYPE (next1))) allsimple = 0; - members = expr_tree_cons (NULL_TREE, next1, members); + members = tree_cons (size_int (i), next1, members); } } else if (TREE_CODE (type) == RECORD_TYPE) @@ -844,7 +844,7 @@ process_init_constructor (type, init, elts) { if (! DECL_NAME (field) && DECL_C_BIT_FIELD (field)) { - members = expr_tree_cons (field, integer_zero_node, members); + members = tree_cons (field, integer_zero_node, members); continue; } @@ -920,7 +920,7 @@ process_init_constructor (type, init, elts) allconstant = 0; else if (! initializer_constant_valid_p (next1, TREE_TYPE (next1))) allsimple = 0; - members = expr_tree_cons (field, next1, members); + members = tree_cons (field, next1, members); } } else if (TREE_CODE (type) == UNION_TYPE @@ -991,7 +991,7 @@ process_init_constructor (type, init, elts) allconstant = 0; else if (initializer_constant_valid_p (next1, TREE_TYPE (next1)) == 0) allsimple = 0; - members = expr_tree_cons (field, next1, members); + members = tree_cons (field, next1, members); } /* If arguments were specified as a list, just remove the ones we used. */