summaryrefslogtreecommitdiffstats
path: root/parse.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'parse.cxx')
-rw-r--r--parse.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse.cxx b/parse.cxx
index 4238f37e..41ec6fef 100644
--- a/parse.cxx
+++ b/parse.cxx
@@ -648,6 +648,8 @@ parser::parse_assignment ()
t->content == "+=" ||
false)) // XXX: add /= etc.
{
+ if (op1->is_lvalue () == 0)
+ throw parse_error ("assignment not to lvalue");
assignment* e = new assignment;
e->left = op1;
e->op = t->content;