summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-09-17 01:45:14 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-09-17 01:45:14 +0000
commit4944e2f7e3104099141e13fc5a663be1edbc5ff4 (patch)
tree89c4ee5e083fd58de39ffde53ac3802e13d471ee /toke.c
parent0640f31bb84d7416f4f8d8cf42a8724fad417771 (diff)
downloadperl-4944e2f7e3104099141e13fc5a663be1edbc5ff4.tar.gz
suppress bogus warning on C<sub x {} x()>
p4raw-id: //depot/perl@1787
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index d22a709352..62d54c635d 100644
--- a/toke.c
+++ b/toke.c
@@ -2979,7 +2979,8 @@ yylex(void)
tmp = -tmp;
gv = Nullgv;
gvp = 0;
- if (ckWARN(WARN_AMBIGUOUS) && hgv)
+ if (ckWARN(WARN_AMBIGUOUS) && hgv
+ && tmp != KEY_x && tmp != KEY_CORE) /* never ambiguous */
warner(WARN_AMBIGUOUS,
"Ambiguous call resolved as CORE::%s(), %s",
GvENAME(hgv), "qualify as such or use &");