aboutsummaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'init.c')
-rw-r--r--init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/init.c b/init.c
index 3e11c71..27498b2 100644
--- a/init.c
+++ b/init.c
@@ -249,7 +249,8 @@ parseinit(struct scope *s, struct type *t)
if (expr->flags & EXPRFLAG_DECAYED && expr->unary.base->kind == EXPRSTRING) {
expr = expr->unary.base;
base = typeunqual(t->base, NULL);
- if (!typecompatible(expr->type->base, base))
+ /* XXX: wide string literals */
+ if (!(typeprop(base) & PROPCHAR))
error(&tok.loc, "array initializer is string literal with incompatible type");
if (t->incomplete)
updatearray(t, expr->string.size);