aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-10-09 21:32:25 +0300
committerArnold D. Robbins <arnold@skeeve.com>2013-10-09 21:32:25 +0300
commit8e4ebdf25bb000f7c84e6cba7c01975c01536f44 (patch)
tree640aabbf0891d3632b0b1620550040e4719f2449 /awkgram.c
parent66fd6df0ec28a87e823b0c8e1768a0660d82f33b (diff)
downloadegawk-8e4ebdf25bb000f7c84e6cba7c01975c01536f44.tar.gz
egawk-8e4ebdf25bb000f7c84e6cba7c01975c01536f44.tar.bz2
egawk-8e4ebdf25bb000f7c84e6cba7c01975c01536f44.zip
Bug fix for $i++ = 3.
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/awkgram.c b/awkgram.c
index 947f4a30..1ca2791a 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -7576,8 +7576,13 @@ mk_assignment(INSTRUCTION *lhs, INSTRUCTION *rhs, INSTRUCTION *op)
case Op_push_array:
tp->opcode = Op_push_lhs;
break;
+ case Op_field_assign:
+ yyerror(_("cannot assign a value to the result of a field post-increment expression"));
+ break;
default:
- cant_happen();
+ yyerror(_("invalid target of assignment (opcode %s)"),
+ opcode2str(tp->opcode));
+ break;
}
tp->do_reference = (op->opcode != Op_assign); /* check for uninitialized reference */