From 3caceb8174110110ba5b0c4c45a885d8c1c5711b Mon Sep 17 00:00:00 2001 From: acqn Date: Mon, 15 Feb 2021 17:30:17 +0800 Subject: [PATCH] Fixed result type in certain contant expression addition cases. --- src/cc65/expr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cc65/expr.c b/src/cc65/expr.c index c932ba622..09a7a1f39 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -3171,6 +3171,9 @@ static void parseadd (ExprDesc* Expr) flags = CF_INT; } + /* Array and function types must be converted to pointer types */ + Expr->Type = PtrConversion (Expr->Type); + /* Result is an rvalue in primary register */ ED_FinalizeRValLoad (Expr); }