aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-03 12:50:07 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:03:57 -0700
commita84e9f4655d6b1a5b31377932a1effb6d319236e (patch)
tree1342f916e5825b3345083977b6a10ae0e5ae0cc1 /symbol.c
parentRemove "fieldwidth" member of struct symbol (diff)
downloadsparse-a84e9f4655d6b1a5b31377932a1effb6d319236e.tar.gz
sparse-a84e9f4655d6b1a5b31377932a1effb6d319236e.tar.bz2
sparse-a84e9f4655d6b1a5b31377932a1effb6d319236e.zip
Set the bit_offset in the SYM_BITFIELD entry too, not just
the actual node. The type should be valid even if somebody peels off the node information.
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/symbol.c b/symbol.c
index b306808..0cff753 100644
--- a/symbol.c
+++ b/symbol.c
@@ -139,6 +139,7 @@ static void lay_out_struct(struct symbol *sym, struct struct_union_info *info)
}
sym->offset = (bit_size - bit_offset) >> 3;
sym->bit_offset = bit_offset;
+ sym->ctype.base_type->bit_offset = bit_offset;
info->bit_size = bit_size + width;
// warning (sym->pos, "bitfield: offset=%d:%d size=:%d", sym->offset, sym->bit_offset, width);