summaryrefslogtreecommitdiff
path: root/awkgram.y
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2019-02-03 22:21:50 +0200
committerArnold D. Robbins <arnold@skeeve.com>2019-02-03 22:21:50 +0200
commitc9b866094dab452054c85971d96ebcb3afdcaacf (patch)
tree775ef664028c6364977ae4e404a852a24d249f86 /awkgram.y
parent348cdff0b903121e4a3d21dec69947fa4fc779cd (diff)
downloadgawk-c9b866094dab452054c85971d96ebcb3afdcaacf.tar.gz
Update TODO, disallow @/.../ as second arg to index.
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/awkgram.y b/awkgram.y
index 415b894b..720efcee 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -4799,7 +4799,7 @@ snode(INSTRUCTION *subn, INSTRUCTION *r)
else if (r->builtin == do_index) {
arg = subn->nexti->lasti->nexti; /* 2nd arg list */
ip = arg->lasti;
- if (ip->opcode == Op_match_rec)
+ if (ip->opcode == Op_match_rec || ip->opcode == Op_push_re)
fatal(_("index: regexp constant as second argument is not allowed"));
}
#ifdef ARRAYDEBUG