diff options
| author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-13 22:54:03 +0000 |
|---|---|---|
| committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-13 22:54:03 +0000 |
| commit | efd3939cc33f07e04eee216a35b4420cc81b32fd (patch) | |
| tree | fdc1be5ec41c1b886780e4d8de0c601ad6838917 /gcc/tree.c | |
| parent | 0578f1031d35f9fef998936604c8d1176c0bfc5a (diff) | |
| download | ppe42-gcc-efd3939cc33f07e04eee216a35b4420cc81b32fd.tar.gz ppe42-gcc-efd3939cc33f07e04eee216a35b4420cc81b32fd.zip | |
* function.c (put_var_into_stack): Use type_for_mode to calculate
part_type. Use MEM_SET_IN_STRUCT_P.
* expr.c (store_field): Handle CONCAT.
(store_constructor): Use fields_length.
* tree.c (fields_length): New fn.
* tree.h: Declare it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32514 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
| -rw-r--r-- | gcc/tree.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index a4159467a15..d52179c44d1 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -2004,6 +2004,22 @@ list_length (t) return len; } +/* Returns the number of FIELD_DECLs in TYPE. */ + +int +fields_length (type) + tree type; +{ + tree t = TYPE_FIELDS (type); + int count = 0; + + for (; t; t = TREE_CHAIN (t)) + if (TREE_CODE (t) == FIELD_DECL) + ++count; + + return count; +} + /* Concatenate two chains of nodes (chained through TREE_CHAIN) by modifying the last node in chain 1 to point to chain 2. This is the Lisp primitive `nconc'. */ |

