diff options
author | David Dyck <david.dyck@fluke.com> | 2000-06-26 02:32:02 -0700 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-06-27 02:12:42 +0000 |
commit | 524710647511337b71f94221f2bea48278a5a629 (patch) | |
tree | 86bb1b70dc161f57f6e4757be0b888a4436065b5 /regcomp.c | |
parent | 514e70b26394e6b272960ab8b9b8b7dbb1e2c068 (diff) | |
download | perl-524710647511337b71f94221f2bea48278a5a629.tar.gz |
Do no -warn on \_, only on \alpha.
Subject: New Unrecognized escape warning for /\_/ from activestate perl-current5.6.0
Message-ID: <Pine.LNX.4.05.10006260830280.3054-100000@dd.tc.fluke.com>
p4raw-id: //depot/cfgperl@6241
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -2646,7 +2646,8 @@ tryagain: FAIL("trailing \\ in regexp"); /* FALL THROUGH */ default: - if (!SIZE_ONLY && ckWARN(WARN_REGEXP) && isALPHA(*p)) + if (!SIZE_ONLY && ckWARN(WARN_REGEXP) && + isALPHA(*p) && *p != '_') Perl_warner(aTHX_ WARN_REGEXP, "/%.127s/: Unrecognized escape \\%c passed through", PL_regprecomp, @@ -2959,7 +2960,8 @@ S_regclass(pTHX) PL_regcomp_parse += numlen; break; default: - if (!SIZE_ONLY && ckWARN(WARN_REGEXP) && isALPHA(value)) + if (!SIZE_ONLY && ckWARN(WARN_REGEXP) && + isALPHA(value) && value != (UV)'_') Perl_warner(aTHX_ WARN_REGEXP, "/%.127s/: Unrecognized escape \\%c in character class passed through", PL_regprecomp, @@ -3443,7 +3445,8 @@ S_regclassutf8(pTHX) PL_regcomp_parse += numlen; break; default: - if (!SIZE_ONLY && ckWARN(WARN_REGEXP) && isALPHA(value)) + if (!SIZE_ONLY && ckWARN(WARN_REGEXP) && + isALPHA(value) && value != (U32)'_') Perl_warner(aTHX_ WARN_REGEXP, "/%.127s/: Unrecognized escape \\%c in character class passed through", PL_regprecomp, |