cproc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/cproc
Log | Files | Refs | Submodules | README | LICENSE

commit d13019290ee2e7f41369f1d31ce903efd26cfd05
parent f67a34503489f74fce416ce4447f291534c21f8f
Author: Michael Forney <mforney@mforney.org>
Date:   Tue, 19 Feb 2019 12:18:27 -0800

Check that left hand side of assignment expression is an lvalue

Diffstat:
Mexpr.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/expr.c b/expr.c @@ -841,6 +841,8 @@ assignexpr(struct scope *s) default: return l; } + if (!(l->flags & EXPRFLAG_LVAL)) + error(&tok.loc, "left side of assignment expression is not an lvalue"); next(); r = assignexpr(s); lvalueconvert(r);