diff options
author | Michael G. Schwern <schwern@pobox.com> | 2002-01-21 10:22:54 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-21 19:36:04 +0000 |
commit | 707afd922f953b906fb39ee9de6af3d448931188 (patch) | |
tree | 542a49ef9f3d4e095a5916d82de2d7fcb48799fe | |
parent | 551b6b6ff9895983c94b1aff97abae5f0914a105 (diff) | |
download | perl-707afd922f953b906fb39ee9de6af3d448931188.tar.gz |
[BUG] /\_/ an unrecognized escape?
Message-ID: <20020121202254.GA6731@blackrider>
p4raw-id: //depot/perl@14371
-rw-r--r-- | t/lib/warnings/toke | 11 | ||||
-rw-r--r-- | toke.c | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke index 70ff3dbbf6..01e31f8612 100644 --- a/t/lib/warnings/toke +++ b/t/lib/warnings/toke @@ -727,3 +727,14 @@ no warnings 'ambiguous'; "@mjd_previously_unused_array"; EXPECT Possible unintended interpolation of @mjd_previously_unused_array in string at - line 3. +######## +# toke.c +# The \q should warn, the \_ should NOT warn. +use warnings 'misc'; +"foo" =~ /\q/; +"bar" =~ /\_/; +no warnings 'misc'; +"foo" =~ /\q/; +"bar" =~ /\_/; +EXPECT +Unrecognized escape \q passed through at - line 4. @@ -1424,7 +1424,9 @@ S_scan_const(pTHX_ char *start) /* FALL THROUGH */ default: { - if (ckWARN(WARN_MISC) && isALNUM(*s)) + if (ckWARN(WARN_MISC) && + isALNUM(*s) && + *s != '_') Perl_warner(aTHX_ WARN_MISC, "Unrecognized escape \\%c passed through", *s); |