aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--expr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/expr.c b/expr.c
index 11d6fbe..aad7cbc 100644
--- 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);