From: Eric Blake Date: Thu, 27 Aug 2009 16:56:53 +0000 (-0600) Subject: scan-gram: avoid portability trap with ctype usage. X-Git-Tag: v2.4.1a~24 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/bbbbe221d7c2ff2fff88f7a0c8dbfee73f2e8a58 scan-gram: avoid portability trap with ctype usage. * src/scan-gram.l (): Avoid compiler warning. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 1e9ce511..f6928199 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-27 Eric Blake + + scan-gram: avoid portability trap with ctype usage. + * src/scan-gram.l (): + Avoid compiler warning. + 2009-08-27 Joel E. Denny tests: use perl for printing special sequences to files. diff --git a/src/scan-gram.l b/src/scan-gram.l index 7cb99f89..ee9f1174 100644 --- a/src/scan-gram.l +++ b/src/scan-gram.l @@ -439,7 +439,7 @@ splice (\\[ \f\t\v]*\n)* \\(.|\n) { char const *p = yytext + 1; /* Quote only if escaping won't make the character visible. */ - if (isspace (*p) && isprint (*p)) + if (isspace ((unsigned char) *p) && isprint ((unsigned char) *p)) p = quote (p); else p = quotearg_style_mem (escape_quoting_style, p, 1);