shithub: scc

Download patch

ref: 753a0f5c2d7a5f6538a9ecc9b93b89ada78459d2
parent: 7ba2b6ce61992330842760339cf7e11d412aa142
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Apr 22 11:12:25 EDT 2014

Fix content()

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

--- a/expr.c
+++ b/expr.c
@@ -379,7 +379,9 @@
 	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 '*'");
 	}