summaryrefslogtreecommitdiff
path: root/utils/cc/dcl.c
diff options
context:
space:
mode:
authorforsyth <forsyth@lavoro.terzarima.net>2013-06-03 21:01:14 +0000
committerforsyth <forsyth@lavoro.terzarima.net>2013-06-03 21:01:14 +0000
commit45a20ab721a513710138340faff3d59a31c3e01e (patch)
treeeea29d2684c51cc73725b8992a2125bede48e118 /utils/cc/dcl.c
parentcd8e99851af33e52bcdf8faf34f9d4e62fa0cbaf (diff)
sync compilers with Plan 9
remove 1[acl] 2[acl]
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;
}
}