aboutsummaryrefslogtreecommitdiff
path: root/expr.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-02-22 21:09:07 -0800
committerMichael Forney <mforney@mforney.org>2019-02-22 21:09:07 -0800
commit8b10f07e6260895025a4ea0efa05b8bd57ca92d9 (patch)
tree57f3c827f43a9777a80dbd405bce9fefee3307a7 /expr.c
parent52eed9336c2cb8cd68ea04be6a71471bef1dcc5e (diff)
When & is applied to an array, it is no longer decayed
Diffstat (limited to 'expr.c')
-rw-r--r--expr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/expr.c b/expr.c
index 009e05f..501e0e5 100644
--- a/expr.c
+++ b/expr.c
@@ -88,8 +88,10 @@ mkunaryexpr(enum tokenkind op, struct expression *base)
switch (op) {
case TBAND:
- if (base->flags & EXPRFLAG_DECAYED)
+ if (base->flags & EXPRFLAG_DECAYED) {
+ base->flags &= ~EXPRFLAG_DECAYED;
return base;
+ }
expr = mkexpr(EXPRUNARY, mkpointertype(base->type), 0);
expr->unary.op = op;
expr->unary.base = base;