From 9463599fdf38b50afcc68f568cf6ad682428ce74 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sun, 21 Apr 2019 00:56:07 -0700 Subject: Keep track of type properties in type --- init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'init.c') 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; } -- cgit v1.2.3