Commit 96756199 by Jason Merrill Committed by Jason Merrill

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
parent 4730fa4f
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> 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (cp_make_fname_decl): New function. * decl.c (cp_make_fname_decl): New function.
......
...@@ -811,7 +811,7 @@ process_init_constructor (type, init, elts) ...@@ -811,7 +811,7 @@ process_init_constructor (type, init, elts)
allconstant = 0; allconstant = 0;
else if (! initializer_constant_valid_p (next1, TREE_TYPE (next1))) else if (! initializer_constant_valid_p (next1, TREE_TYPE (next1)))
allsimple = 0; 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) else if (TREE_CODE (type) == RECORD_TYPE)
...@@ -844,7 +844,7 @@ process_init_constructor (type, init, elts) ...@@ -844,7 +844,7 @@ process_init_constructor (type, init, elts)
{ {
if (! DECL_NAME (field) && DECL_C_BIT_FIELD (field)) 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; continue;
} }
...@@ -920,7 +920,7 @@ process_init_constructor (type, init, elts) ...@@ -920,7 +920,7 @@ process_init_constructor (type, init, elts)
allconstant = 0; allconstant = 0;
else if (! initializer_constant_valid_p (next1, TREE_TYPE (next1))) else if (! initializer_constant_valid_p (next1, TREE_TYPE (next1)))
allsimple = 0; allsimple = 0;
members = expr_tree_cons (field, next1, members); members = tree_cons (field, next1, members);
} }
} }
else if (TREE_CODE (type) == UNION_TYPE else if (TREE_CODE (type) == UNION_TYPE
...@@ -991,7 +991,7 @@ process_init_constructor (type, init, elts) ...@@ -991,7 +991,7 @@ process_init_constructor (type, init, elts)
allconstant = 0; allconstant = 0;
else if (initializer_constant_valid_p (next1, TREE_TYPE (next1)) == 0) else if (initializer_constant_valid_p (next1, TREE_TYPE (next1)) == 0)
allsimple = 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. */ /* If arguments were specified as a list, just remove the ones we used. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment