From d1995fc81aee6047a05418f89d4ee57a73fcb09c Mon Sep 17 00:00:00 2001 From: acqn Date: Sat, 15 Aug 2020 06:27:11 +0800 Subject: [PATCH] Fixed rvalue-ness of cast results. --- src/cc65/typeconv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cc65/typeconv.c b/src/cc65/typeconv.c index 3af092d42..0f67db107 100644 --- a/src/cc65/typeconv.c +++ b/src/cc65/typeconv.c @@ -370,4 +370,7 @@ void TypeCast (ExprDesc* Expr) Error ("Arithmetic or pointer type expected but %s is used", GetBasicTypeName (NewType)); } + + /* The result is always an rvalue */ + ED_MarkExprAsRVal (Expr); }