summaryrefslogtreecommitdiff
path: root/utils/cc/dcl.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/cc/dcl.c')
-rw-r--r--utils/cc/dcl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/cc/dcl.c b/utils/cc/dcl.c
index 6a8e7245..c6b762a6 100644
--- a/utils/cc/dcl.c
+++ b/utils/cc/dcl.c
@@ -232,7 +232,7 @@ nextinit(void)
a->cstring++;
}
if(a->op == OLSTRING) {
- b->vconst = convvtox(*a->rstring, TUSHORT);
+ b->vconst = convvtox(*a->rstring, TRUNE);
a->rstring++;
}
a->type->width -= b->type->width;
@@ -519,7 +519,7 @@ newlist(Node *l, Node *r)
}
void
-suallign(Type *t)
+sualign(Type *t)
{
Type *l;
long o, w;
@@ -540,8 +540,8 @@ suallign(Type *t)
}
l->offset = o;
} else {
- if(l->width <= 0)
- if(l->down != T)
+ if(l->width < 0 ||
+ l->width == 0 && l->down != T)
if(l->sym)
diag(Z, "incomplete structure element: %s",
l->sym->name);
@@ -581,7 +581,7 @@ suallign(Type *t)
return;
default:
- diag(Z, "unknown type in suallign: %T", t);
+ diag(Z, "unknown type in sualign: %T", t);
break;
}
}