diff options
author | Michael Forney <mforney@mforney.org> | 2019-04-21 00:56:07 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-04-21 01:06:39 -0700 |
commit | 9463599fdf38b50afcc68f568cf6ad682428ce74 (patch) | |
tree | 8ab77f6d3984f197ab705003653f3e0e3eb5a5a5 /init.c | |
parent | 220ec69d2c45b4ab234bf39d227954e49a264e31 (diff) |
Keep track of type properties in type
Diffstat (limited to 'init.c')
-rw-r--r-- | init.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |