scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 753a0f5c2d7a5f6538a9ecc9b93b89ada78459d2
parent 7ba2b6ce61992330842760339cf7e11d412aa142
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 22 Apr 2014 15:12:25 +0200

Fix content()

After taking the content of a pointer the result is always
a lvalue.

Diffstat:
expr.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/expr.c b/expr.c @@ -379,7 +379,9 @@ content(char op, Node *np) case ARY: case FTN: np = addr2ptr(np); case PTR: - return unarycode(op, np->utype->type, np); + np = unarycode(op, np->utype->type, np); + np->b.lvalue = 1; + return np; default: error("invalid argument of unary '*'"); }