[win32] another toke.c maintpatch
Chip Salzenberg [Tue, 3 Mar 1998 03:12:16 +0000 (03:12 +0000)]
    #28:  "Don't warn on $x{shift}, ne => 1, or -f => 1"
  Files:  toke.c

p4raw-id: //depot/win32/perl@632

toke.c

diff --git a/toke.c b/toke.c
index 4fee674..ef2ace0 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -2007,9 +2007,6 @@ yylex(void)
                s++;
 
            if (strnEQ(s,"=>",2)) {
-               if (dowarn)
-                   warn("Ambiguous use of -%c => resolved to \"-%c\" =>",
-                       (int)tmp, (int)tmp);
                s = force_word(bufptr,WORD,FALSE,FALSE,FALSE);
                OPERATOR('-');          /* unary minus */
            }
@@ -2211,12 +2208,6 @@ yylex(void)
                    d++;
                if (*d == '}') {
                    char minus = (tokenbuf[0] == '-');
-                   if (dowarn &&
-                       (keyword(tokenbuf + 1, len) ||
-                        (minus && len == 1 && isALPHA(tokenbuf[1])) ||
-                        perl_get_cv(tokenbuf + 1, FALSE) ))
-                       warn("Ambiguous use of {%s} resolved to {\"%s\"}",
-                            tokenbuf + !minus, tokenbuf + !minus);
                    s = force_word(s + minus, WORD, FALSE, TRUE, FALSE);
                    if (minus)
                        force_next('-');
@@ -2812,9 +2803,6 @@ yylex(void)
        /* Is this a word before a => operator? */
        if (strnEQ(d,"=>",2)) {
            CLINE;
-           if (dowarn && (tmp || perl_get_cv(tokenbuf, FALSE)))
-               warn("Ambiguous use of %s => resolved to \"%s\" =>",
-                       tokenbuf, tokenbuf);
            yylval.opval = (OP*)newSVOP(OP_CONST, 0, newSVpv(tokenbuf,0));
            yylval.opval->op_private = OPpCONST_BARE;
            TERM(WORD);