]> 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:18:56 +0000 (20:18 -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 aaeb44407c1f832895e8158f9d55d130a7aef22a..fc9a27459a1cefb7d85e6d613165d7ed5ddaf088 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 93e0d1033ad39eeb9c75707f5b7de46e366beed3..bcb7209b5101aa5d4d16b36200f71d61f7e64343 100644 (file)
@@ -618,7 +618,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);