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 /toke.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 'toke.c')
-rw-r--r-- | toke.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1056,7 +1056,7 @@ scan_const(char *start) s++; /* some backslashes we leave behind */ - if (*s && strchr(leaveit, *s)) { + if (*leaveit && *s && strchr(leaveit, *s)) { *d++ = '\\'; *d++ = *s++; continue; @@ -1091,6 +1091,10 @@ scan_const(char *start) /* FALL THROUGH */ /* default action is to copy the quoted character */ default: + if (ckWARN(WARN_UNSAFE) && isALPHA(*s)) + warner(WARN_UNSAFE, + "Unrecognized escape \\%c passed through", + *s); *d++ = *s++; continue; |