aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1999-10-07 20:10:09 -0400
committerJason Merrill <jason@gcc.gnu.org>1999-10-07 20:10:09 -0400
commit6fbfac9226aa91f37641f562f200cd6fa35b4611 (patch)
treeb1c3c499a16276b254e73a32086cb072d17359cb /gcc/c-decl.c
parent11028a5379153307e5eef4b71b836e41b11551c6 (diff)
downloadgcc-6fbfac9226aa91f37641f562f200cd6fa35b4611.zip
gcc-6fbfac9226aa91f37641f562f200cd6fa35b4611.tar.gz
gcc-6fbfac9226aa91f37641f562f200cd6fa35b4611.tar.bz2
expr.c (expand_expr, [...]): Set TREE_USED sooner.
* expr.c (expand_expr, TARGET_EXPR): Set TREE_USED sooner. * c-decl.c (finish_struct): Use simpler method of removing elements of a singly-linked list. From-SVN: r29860
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index b6facc7..37915a4 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -5526,17 +5526,15 @@ finish_struct (t, fieldlist, attributes)
layout_type (t);
- /* Delete all zero-width bit-fields from the front of the fieldlist */
- while (fieldlist
- && DECL_INITIAL (fieldlist))
- fieldlist = TREE_CHAIN (fieldlist);
- /* Delete all such members from the rest of the fieldlist */
- for (x = fieldlist; x;)
- {
- if (TREE_CHAIN (x) && DECL_INITIAL (TREE_CHAIN (x)))
- TREE_CHAIN (x) = TREE_CHAIN (TREE_CHAIN (x));
- else x = TREE_CHAIN (x);
- }
+ /* Delete all zero-width bit-fields from the fieldlist */
+ {
+ tree *fieldlistp = &fieldlist;
+ while (*fieldlistp && TREE_CODE (*fieldlistp) == FIELD_DECL)
+ if (DECL_INITIAL (*fieldlistp))
+ *fieldlistp = TREE_CHAIN (*fieldlistp);
+ else
+ fieldlistp = &TREE_CHAIN (*fieldlistp);
+ }
/* Now we have the truly final field list.
Store it in this type and in the variants. */