ref: d6882e116c61b3ec3a79c29ceabbafe36196235f
parent: 207d86eced0726bf8ce0eaeb6b6e06a40e47a2d9
author: Ori Bernstein <[email protected]>
date: Sat May 2 17:51:59 EDT 2015
Make arrays/structs/... lvalue expressions.
--- a/6/simp.c
+++ b/6/simp.c
@@ -815,7 +815,10 @@
case Ovar: r = n; break;
case Oidx: r = deref(idxaddr(s, args[0], args[1]), NULL); break;
case Oderef: r = deref(rval(s, args[0], NULL), NULL); break;
- case Omemb: r = deref(membaddr(s, n), NULL); break;
+ case Omemb: r = rval(s, n, NULL); break;
+ case Ostruct: r = rval(s, n, NULL); break;
+ case Oucon: r = rval(s, n, NULL); break;
+ case Oarr: r = rval(s, n, NULL); break;
default:
fatal(n, "%s cannot be an lvalue", opstr[exprop(n)]);
break;