summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-12-09 12:39:31 +0200
committerJarkko Hietaniemi <jhi@iki.fi>1998-12-29 11:32:26 +0000
commitc9f97d15d3a5d7fcbfc403087c4a4a450990ff7c (patch)
treefa4692437f8fa59c7d5edda5f32a44ca558d9a76 /toke.c
parentad94a51148da69b36625e16c155cd6147ed14f1a (diff)
downloadperl-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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index b1bd0d701c..b9fa540103 100644
--- a/toke.c
+++ b/toke.c
@@ -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;