scc

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

commit 84847138062fe977c49c7dc838d8421ed2064822
parent 49ea14f17cb76c7112691a4ed951315f3d105c63
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 13 Aug 2015 23:38:03 +0200

Set field of struct are lvalues

The lvalue flag was not set in the node when a field was implied.
We have to do some additional test here, because not all the structure
field can be a lvalue, but it is first approach.

Diffstat:
cc1/expr.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/cc1/expr.c b/cc1/expr.c @@ -607,6 +607,7 @@ field(Node *np) error("incorrect field in struct/union"); next(); np = node(OFIELD, sym->type, np, NULL); + np->lvalue = 1; np->sym = sym; return np; default: