aboutsummaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-04-21 00:56:07 -0700
committerMichael Forney <mforney@mforney.org>2019-04-21 01:06:39 -0700
commit9463599fdf38b50afcc68f568cf6ad682428ce74 (patch)
tree8ab77f6d3984f197ab705003653f3e0e3eb5a5a5 /init.c
parent220ec69d2c45b4ab234bf39d227954e49a264e31 (diff)
Keep track of type properties in type
Diffstat (limited to 'init.c')
-rw-r--r--init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.c b/init.c
index beba85f..2eee141 100644
--- a/init.c
+++ b/init.c
@@ -244,7 +244,7 @@ parseinit(struct scope *s, struct type *t)
expr = expr->unary.base;
base = t->base;
/* XXX: wide string literals */
- if (!(typeprop(base) & PROPCHAR))
+ if (!(base->prop & PROPCHAR))
error(&tok.loc, "array initializer is string literal with incompatible type");
if (t->incomplete)
updatearray(t, expr->string.size);
@@ -257,7 +257,7 @@ parseinit(struct scope *s, struct type *t)
goto add;
break;
default: /* scalar type */
- assert(typeprop(t) & PROPSCALAR);
+ assert(t->prop & PROPSCALAR);
expr = exprconvert(expr, t);
goto add;
}