This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[obv] change a few more TREE_CHAINs to DECL_CHAINs
- From: Nathan Froyd <froydnj at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 15 Jul 2010 18:30:37 -0700
- Subject: [obv] change a few more TREE_CHAINs to DECL_CHAINs
I went back and reviewed all the TREE_CHAINs my scripts had converted
into DECL_CHAINs and then back again and discovered a few below that
shouldn't have gotten converted back. I must have been debugging my
scripts or something similar. I think these qualify as obvious.
Tested with bootstrap on x86_64-unknown-linux-gnu, tested with cross to
arm-eabi, mips-elf, and powerpc-eabispe. Committed.
-Nathan
* c-decl.c (detect_field_duplicates): Use DECL_CHAIN insted of
TREE_CHAIN.
* c-typeck.c (push_init_level): Likewise.
(process_init_element): Likewise.
Index: c-decl.c
===================================================================
--- c-decl.c (revision 162238)
+++ c-decl.c (working copy)
@@ -6705,8 +6705,7 @@ detect_field_duplicates (tree fieldlist)
the nested traversal thing. */
if (timeout > 0)
{
- for (x = TREE_CHAIN (fieldlist); x ;
- x = TREE_CHAIN (x))
+ for (x = DECL_CHAIN (fieldlist); x; x = DECL_CHAIN (x))
if (DECL_NAME (x))
{
for (y = fieldlist; y != x; y = TREE_CHAIN (y))
Index: c-typeck.c
===================================================================
--- c-typeck.c (revision 162238)
+++ c-typeck.c (working copy)
@@ -6683,7 +6683,7 @@ push_init_level (int implicit, struct ob
/* Skip any nameless bit fields at the beginning. */
while (constructor_fields != 0 && DECL_C_BIT_FIELD (constructor_fields)
&& DECL_NAME (constructor_fields) == 0)
- constructor_fields = TREE_CHAIN (constructor_fields);
+ constructor_fields = DECL_CHAIN (constructor_fields);
constructor_unfilled_fields = constructor_fields;
constructor_bit_index = bitsize_zero_node;
@@ -8014,7 +8014,7 @@ process_init_element (struct c_expr valu
if (fieldcode == ARRAY_TYPE
&& !require_constant_value
&& 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");
break;
@@ -8144,7 +8144,7 @@ process_init_element (struct c_expr valu
directly output as a constructor. */
{
constructor_bit_index = DECL_SIZE (constructor_fields);
- constructor_unfilled_fields = TREE_CHAIN (constructor_fields);
+ constructor_unfilled_fields = DECL_CHAIN (constructor_fields);
}
constructor_fields = 0;