diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1998-12-09 12:39:31 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1998-12-29 11:32:26 +0000 |
commit | c9f97d15d3a5d7fcbfc403087c4a4a450990ff7c (patch) | |
tree | fa4692437f8fa59c7d5edda5f32a44ca558d9a76 /regcomp.c | |
parent | ad94a51148da69b36625e16c155cd6147ed14f1a (diff) | |
download | perl-c9f97d15d3a5d7fcbfc403087c4a4a450990ff7c.tar.gz |
Warn on unrecognized alpha escapes.
To: perl5-porters@perl.org (Mailing list Perl5)
Message-ID: <MLIST_199812090823.DAA17566@monk.mps.ohio-state.edu>
p4raw-id: //depot/cfgperl@2516
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1878,6 +1878,8 @@ tryagain: FAIL("trailing \\ in regexp"); /* FALL THROUGH */ default: + /* Do not generate `unrecognized' warnings here, we fall + back into the quick-grab loop below */ goto defchar; } break; @@ -2008,6 +2010,11 @@ tryagain: FAIL("trailing \\ in regexp"); /* FALL THROUGH */ default: + if (!SIZE_ONLY && ckWARN(WARN_UNSAFE) && isALPHA(*p)) + warner(WARN_UNSAFE, + "/%.127s/: Unrecognized escape \\%c passed through", + PL_regprecomp, + *p); goto normal_default; } break; |