From 7a4a1be3d8fef2ea5322d976b71efaf514d719dc Mon Sep 17 00:00:00 2001 From: privero Date: Thu, 22 Jul 2021 14:33:19 +0200 Subject: [PATCH] Implement lcc pull request n.19 Implement changes from: https://github.com/drh/lcc/pull/19 --- src/expr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/expr.c b/src/expr.c index f63a3f5d..2008faed 100755 --- a/src/expr.c +++ b/src/expr.c @@ -157,9 +157,11 @@ static Tree unary(void) { p->u.sym->addressed = 1; break; case '+': t = gettok(); p = unary(); p = pointer(p); - if (isarith(p->type)) - p = cast(p, promote(p->type)); - else + if (isarith(p->type)) { + p = cast(p, promote(p->type)); + if (generic(p->op) == INDIR) + p = tree(RIGHT, p->type, NULL, p); + } else typeerror(ADD, p, NULL); break; case '-': t = gettok(); p = unary(); p = pointer(p); if (isarith(p->type)) {