Skip to content

Commit

Permalink
Implement lcc pull request n.19
Browse files Browse the repository at this point in the history
Implement changes from: drh#19
  • Loading branch information
pol-rivero committed Jul 22, 2021
1 parent d26834e commit 7a4a1be
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 7a4a1be

Please sign in to comment.