suppress bogus warning on C<sub x {} x()>
Gurusamy Sarathy [Thu, 17 Sep 1998 01:45:14 +0000 (01:45 +0000)]
p4raw-id: //depot/perl@1787

toke.c

diff --git a/toke.c b/toke.c
index d22a709..62d54c6 100644 (file)
--- 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 &");