]> git.saurik.com Git - bison.git/commitdiff
scan-gram: avoid portability trap with ctype usage.
authorEric Blake <ebb9@byu.net>
Thu, 27 Aug 2009 16:56:53 +0000 (10:56 -0600)
committerEric Blake <ebb9@byu.net>
Fri, 28 Aug 2009 02:17:23 +0000 (20:17 -0600)
* src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
Avoid compiler warning.

Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit bbbbe221d7c2ff2fff88f7a0c8dbfee73f2e8a58)

ChangeLog
src/scan-gram.l

index 73c1c3e74cb5995163b66e6a21f56c1ea3b3ae20..9a7c0d2ca74e6f0ce63b2090d27b0d63a430ec89 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-27  Eric Blake  <ebb9@byu.net>
+
+       scan-gram: avoid portability trap with ctype usage.
+       * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
+       Avoid compiler warning.
+
 2009-08-27  Joel E. Denny  <jdenny@clemson.edu>
 
        tests: use perl for printing special sequences to files.
index f0f8c2796b084d19dbde8481db4d239f3bd994e4..f199ec38ef337fa5e72cf98bba483f21e62cbc06 100644 (file)
@@ -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);