aboutsummaryrefslogtreecommitdiff
path: root/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'expr.c')
-rw-r--r--expr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/expr.c b/expr.c
index fb6c144..f686da2 100644
--- a/expr.c
+++ b/expr.c
@@ -1107,6 +1107,7 @@ static struct expr *
castexpr(struct scope *s)
{
struct type *t, *ct;
+ struct decl *d;
enum typequal tq;
struct expr *r, *e, **end;
@@ -1126,8 +1127,10 @@ castexpr(struct scope *s)
e = mkexpr(EXPRCOMPOUND, t, NULL);
e->qual = tq;
e->lvalue = true;
+ d = mkdecl(NULL, DECLOBJECT, t, tq, LINKNONE);
+ d->u.obj.storage = s == &filescope ? SDSTATIC : SDAUTO;
+ e->u.compound.decl = d;
e->u.compound.init = parseinit(s, t);
- e->u.compound.storage = s == &filescope ? SDSTATIC : SDAUTO;
e = postfixexpr(s, decay(e));
goto done;
}