summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorDavid Dyck <david.dyck@fluke.com>2000-06-26 02:32:02 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2000-06-27 02:12:42 +0000
commit524710647511337b71f94221f2bea48278a5a629 (patch)
tree86bb1b70dc161f57f6e4757be0b888a4436065b5 /regcomp.c
parent514e70b26394e6b272960ab8b9b8b7dbb1e2c068 (diff)
downloadperl-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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/regcomp.c b/regcomp.c
index 89b3e53bab..0407e69787 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -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,