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
This commit is contained in:
Jason Merrill 2000-03-08 15:56:16 +00:00 committed by Jason Merrill
parent 4730fa4fad
commit 967561999c
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2000-03-08 Jason Merrill <jason@casey.cygnus.com>
* typeck2.c (process_init_constructor): Set TREE_PURPOSE of
array CONSTRUCTOR elements. Don't use expr_tree_cons.
2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (cp_make_fname_decl): New function.

View File

@ -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. */