diff options
author | Michael Forney <mforney@mforney.org> | 2019-02-19 12:18:27 -0800 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-02-19 12:18:27 -0800 |
commit | d13019290ee2e7f41369f1d31ce903efd26cfd05 (patch) | |
tree | 4fb4d2fdee4319aea41cac267dbb9dc5a4a5310f /expr.c | |
parent | f67a34503489f74fce416ce4447f291534c21f8f (diff) |
Check that left hand side of assignment expression is an lvalue
Diffstat (limited to 'expr.c')
-rw-r--r-- | expr.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |