Skip to content

Commit 7a4a1be

Browse files
committed
Implement lcc pull request n.19
Implement changes from: drh#19
1 parent d26834e commit 7a4a1be

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/expr.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,11 @@ static Tree unary(void) {
157157
p->u.sym->addressed = 1;
158158
break;
159159
case '+': t = gettok(); p = unary(); p = pointer(p);
160-
if (isarith(p->type))
161-
p = cast(p, promote(p->type));
162-
else
160+
if (isarith(p->type)) {
161+
p = cast(p, promote(p->type));
162+
if (generic(p->op) == INDIR)
163+
p = tree(RIGHT, p->type, NULL, p);
164+
} else
163165
typeerror(ADD, p, NULL); break;
164166
case '-': t = gettok(); p = unary(); p = pointer(p);
165167
if (isarith(p->type)) {

0 commit comments

Comments
 (0)