diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-03 12:40:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:03:56 -0700 |
commit | 19da63710dc5cee1e0282e2f902753d8d1f64bdf (patch) | |
tree | 18636f980353e9c9622aad1d49ea7092ae7139be /show-parse.c | |
parent | Make bitfield assignment type evaluation aware of the bit offset. (diff) | |
download | sparse-19da63710dc5cee1e0282e2f902753d8d1f64bdf.tar.gz sparse-19da63710dc5cee1e0282e2f902753d8d1f64bdf.tar.bz2 sparse-19da63710dc5cee1e0282e2f902753d8d1f64bdf.zip |
Remove "fieldwidth" member of struct symbol
It's always the same as bit_size now, and having it just confuses
things.
We now check whether we have examined a type by looking at the
"examined" bitfield, which allows us to set bit_size in the early
parsing phase.
Diffstat (limited to 'show-parse.c')
-rw-r--r-- | show-parse.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/show-parse.c b/show-parse.c index e7d5773..72d00e3 100644 --- a/show-parse.c +++ b/show-parse.c @@ -111,9 +111,7 @@ const char *modifier_string(unsigned long mod) void show_struct_member(struct symbol *sym) { - printf("\t%s:%d:%ld at offset %ld", show_ident(sym->ident), sym->bit_size, sym->ctype.alignment, sym->offset); - if (sym->fieldwidth) - printf("[%d..%d]", sym->bit_offset, sym->bit_offset+sym->fieldwidth-1); + printf("\t%s:%d:%ld at offset %ld.%d", show_ident(sym->ident), sym->bit_size, sym->ctype.alignment, sym->offset, sym->bit_offset); printf("\n"); } @@ -236,7 +234,7 @@ static void do_show_type(struct symbol *sym, struct type_name *name) break; case SYM_BITFIELD: - append(name, ":%d", sym->fieldwidth); + append(name, ":%d", sym->bit_size); break; case SYM_LABEL: |