Commit f7587ed0 by Nathan Froyd Committed by Nathan Froyd

c-decl.c (detect_field_duplicates): Use DECL_CHAIN insted of TREE_CHAIN.

	* c-decl.c (detect_field_duplicates): Use DECL_CHAIN insted of
	TREE_CHAIN.
	* c-typeck.c (push_init_level): Likewise.
	(process_init_element): Likewise.

From-SVN: r162239
parent f0cd14a7
2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
* c-decl.c (detect_field_duplicates): Use DECL_CHAIN insted of
TREE_CHAIN.
* c-typeck.c (push_init_level): Likewise.
(process_init_element): Likewise.
2010-07-15 Anatoly Sokolov <aesok@post.ru> 2010-07-15 Anatoly Sokolov <aesok@post.ru>
* tree.h (enum tree_index): Add TI_INTEGER_THREE. * tree.h (enum tree_index): Add TI_INTEGER_THREE.
......
...@@ -6705,8 +6705,7 @@ detect_field_duplicates (tree fieldlist) ...@@ -6705,8 +6705,7 @@ detect_field_duplicates (tree fieldlist)
the nested traversal thing. */ the nested traversal thing. */
if (timeout > 0) if (timeout > 0)
{ {
for (x = TREE_CHAIN (fieldlist); x ; for (x = DECL_CHAIN (fieldlist); x; x = DECL_CHAIN (x))
x = TREE_CHAIN (x))
if (DECL_NAME (x)) if (DECL_NAME (x))
{ {
for (y = fieldlist; y != x; y = TREE_CHAIN (y)) for (y = fieldlist; y != x; y = TREE_CHAIN (y))
......
...@@ -6683,7 +6683,7 @@ push_init_level (int implicit, struct obstack * braced_init_obstack) ...@@ -6683,7 +6683,7 @@ push_init_level (int implicit, struct obstack * braced_init_obstack)
/* Skip any nameless bit fields at the beginning. */ /* Skip any nameless bit fields at the beginning. */
while (constructor_fields != 0 && DECL_C_BIT_FIELD (constructor_fields) while (constructor_fields != 0 && DECL_C_BIT_FIELD (constructor_fields)
&& DECL_NAME (constructor_fields) == 0) && DECL_NAME (constructor_fields) == 0)
constructor_fields = TREE_CHAIN (constructor_fields); constructor_fields = DECL_CHAIN (constructor_fields);
constructor_unfilled_fields = constructor_fields; constructor_unfilled_fields = constructor_fields;
constructor_bit_index = bitsize_zero_node; constructor_bit_index = bitsize_zero_node;
...@@ -8014,7 +8014,7 @@ process_init_element (struct c_expr value, bool implicit, ...@@ -8014,7 +8014,7 @@ process_init_element (struct c_expr value, bool implicit,
if (fieldcode == ARRAY_TYPE if (fieldcode == ARRAY_TYPE
&& !require_constant_value && !require_constant_value
&& TYPE_SIZE (fieldtype) == NULL_TREE && TYPE_SIZE (fieldtype) == NULL_TREE
&& TREE_CHAIN (constructor_fields) == NULL_TREE) && DECL_CHAIN (constructor_fields) == NULL_TREE)
{ {
error_init ("non-static initialization of a flexible array member"); error_init ("non-static initialization of a flexible array member");
break; break;
...@@ -8144,7 +8144,7 @@ process_init_element (struct c_expr value, bool implicit, ...@@ -8144,7 +8144,7 @@ process_init_element (struct c_expr value, bool implicit,
directly output as a constructor. */ directly output as a constructor. */
{ {
constructor_bit_index = DECL_SIZE (constructor_fields); constructor_bit_index = DECL_SIZE (constructor_fields);
constructor_unfilled_fields = TREE_CHAIN (constructor_fields); constructor_unfilled_fields = DECL_CHAIN (constructor_fields);
} }
constructor_fields = 0; constructor_fields = 0;
......
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