diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-07-14 15:47:26 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-07-14 15:47:26 +0000 |
commit | 7ce786d141abf0e40bd45507173aee1a7c4eb553 (patch) | |
tree | 8a190932da534975c2ab0ac6119d573526508f79 | |
parent | 3dc151ad9f4953293f9c4de3d86c04a06fcce107 (diff) | |
download | gcc-7ce786d141abf0e40bd45507173aee1a7c4eb553.tar.gz |
* c-typeck.c (output_init_element, process_init_element):
When advancing constructor_unfilled_fields for a RECORD_TYPE,
check for nameless bit fields.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28098 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-typeck.c | 17 |
2 files changed, 22 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d708c5dc197..d921095717b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Wed Jul 14 23:45:48 1999 J"orn Rennecke <amylaar@cygnus.co.uk> + + * c-typeck.c (output_init_element, process_init_element): + When advancing constructor_unfilled_fields for a RECORD_TYPE, + check for nameless bit fields. + Wed Jul 14 01:57:39 1999 Richard Henderson <rth@cygnus.com> * regclass.c (scan_one_insn): Notice subregs that change the diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index d4749cda234..18b82109ed5 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -6150,7 +6150,16 @@ output_init_element (value, type, field, pending) = TREE_INT_CST_HIGH (tem); } else if (TREE_CODE (constructor_type) == RECORD_TYPE) - constructor_unfilled_fields = TREE_CHAIN (constructor_unfilled_fields); + { + constructor_unfilled_fields = + TREE_CHAIN (constructor_unfilled_fields); + /* Skip any nameless bit fields. */ + while (constructor_unfilled_fields != 0 + && DECL_C_BIT_FIELD (constructor_unfilled_fields) + && DECL_NAME (constructor_unfilled_fields) == 0) + constructor_unfilled_fields = + TREE_CHAIN (constructor_unfilled_fields); + } else if (TREE_CODE (constructor_type) == UNION_TYPE) constructor_unfilled_fields = 0; @@ -6485,6 +6494,12 @@ process_init_element (value) = TREE_INT_CST_HIGH (temp); constructor_unfilled_fields = TREE_CHAIN (constructor_fields); + /* Skip any nameless bit fields. */ + while (constructor_unfilled_fields != 0 + && DECL_C_BIT_FIELD (constructor_unfilled_fields) + && DECL_NAME (constructor_unfilled_fields) == 0) + constructor_unfilled_fields = + TREE_CHAIN (constructor_unfilled_fields); } constructor_fields = TREE_CHAIN (constructor_fields); |