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.5_rc1~176 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/4bb975e1ad59a39460fe6b16eec5c7830f904b6b scan-gram: avoid portability trap with ctype usage. * src/scan-gram.l (): Avoid compiler warning. Signed-off-by: Eric Blake (cherry picked from commit bbbbe221d7c2ff2fff88f7a0c8dbfee73f2e8a58) --- diff --git a/ChangeLog b/ChangeLog index 73c1c3e7..9a7c0d2c 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 f0f8c279..f199ec38 100644 --- a/src/scan-gram.l +++ b/src/scan-gram.l @@ -561,7 +561,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);