From 8e4ebdf25bb000f7c84e6cba7c01975c01536f44 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 9 Oct 2013 21:32:25 +0300 Subject: Bug fix for $i++ = 3. --- awkgram.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'awkgram.c') 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 */ -- cgit v1.2.3