summaryrefslogtreecommitdiff
path: root/src/cmd/godefs
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-03-31 15:44:43 -0700
committerRuss Cox <rsc@golang.org>2009-03-31 15:44:43 -0700
commit3b0a284b53d78b684255264997a1550230a31970 (patch)
treeb2dd7337dfb03c14cc4f08995e9ad1896ce34933 /src/cmd/godefs
parent83eed1e23c1eec9beae9923e6fdbd55263396003 (diff)
downloadgo-3b0a284b53d78b684255264997a1550230a31970.tar.gz
multiple bugs in bitfield handling
R=r DELTA=6 (3 added, 0 deleted, 3 changed) OCL=26944 CL=26967
Diffstat (limited to 'src/cmd/godefs')
-rw-r--r--src/cmd/godefs/stabs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cmd/godefs/stabs.c b/src/cmd/godefs/stabs.c
index 5a6f18b15..e3f175f37 100644
--- a/src/cmd/godefs/stabs.c
+++ b/src/cmd/godefs/stabs.c
@@ -141,6 +141,7 @@ Intrange intranges[] = {
static int kindsize[] = {
0,
+ 0,
8,
8,
16,
@@ -366,10 +367,12 @@ parsedef(char **pp, char *name)
// into
// uint8 x;
// hooray for bitfields.
+ while(f->type->kind == Typedef)
+ f->type = f->type->type;
while(Int16 <= f->type->kind && f->type->kind <= Uint64 && kindsize[f->type->kind] > f->size) {
- t = emalloc(sizeof *t);
- *t = *f->type;
- f->type = t;
+ tt = emalloc(sizeof *tt);
+ *tt = *f->type;
+ f->type = tt;
f->type->kind -= 2;
}
p++;