From b82a2315827553f8d1e7476b1261c5f1d00a7c7e Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Fri, 13 May 2022 12:00:17 -0700 Subject: expr: Fix qualifiers of base type during implicit array conversion --- expr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/expr.c b/expr.c index 55b31cf..98b23a9 100644 --- a/expr.c +++ b/expr.c @@ -98,8 +98,9 @@ decay(struct expr *e) tq = e->qual; switch (t->kind) { case TYPEARRAY: + assert(tq == QUALNONE); e = mkunaryexpr(TBAND, e); - e->type = mkpointertype(t->base, tq); + e->type = mkpointertype(t->base, t->qual); e->decayed = true; break; case TYPEFUNC: -- cgit v1.2.3