This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
suppress bogus warning on C<sub x {} x()>
authorGurusamy Sarathy <gsar@cpan.org>
Sun, 6 Sep 1998 15:35:11 +0000 (11:35 -0400)
committerGraham Barr <gbarr@pobox.com>
Sun, 20 Sep 1998 14:40:56 +0000 (14:40 +0000)
       Message-Id: <199809061935.PAA21531@aatma.engin.umich.edu>

p4raw-id: //depot/maint-5.005/perl@1790

toke.c

diff --git a/toke.c b/toke.c
index c069978..00aa0c2 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -2868,7 +2868,8 @@ yylex(void)
                tmp = -tmp;
                gv = Nullgv;
                gvp = 0;
-               if (PL_dowarn && hgv)
+               if (PL_dowarn && hgv
+                   && tmp != KEY_x && tmp != KEY_CORE) /* never ambiguous */
                    warn("Ambiguous call resolved as CORE::%s(), %s",
                         GvENAME(hgv), "qualify as such or use &");
            }