]> git.saurik.com Git - bison.git/commitdiff
* data/lalr1.cc: When displaying a line number, be sure to make it
authorAkim Demaille <akim@epita.fr>
Wed, 19 Feb 2003 14:55:14 +0000 (14:55 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 19 Feb 2003 14:55:14 +0000 (14:55 +0000)
an int.

ChangeLog
data/lalr1.cc

index e092838dace6e25ddce2498825bb77e7e6002609..679e762d7dc35944bfaf03d9f839baa2b4df52a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-19  Akim Demaille  <akim@epita.fr>
+
+       * data/lalr1.cc: When displaying a line number, be sure to make it
+       an int.
+
 2003-02-19  Akim Demaille  <akim@epita.fr>
 
        * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
index 214adb27aca07381a4bd1f85c968ae325812b2e5..148642203e3212137314e6c1edd443b6753728e9 100644 (file)
@@ -429,8 +429,11 @@ yy::]b4_parser_class_name[::parse ()
 #if YYDEBUG
   if (debug_)
     {
+      // Short files will use "unsigned char" for line numbers,
+      // in which case they will be output as character litterals
+      // by "<<".
       YYCDEBUG << "Reducing via rule " << n_ - 1
-            << " (line " << rline_[n_] << "), ";
+               << " (line " << static_cast <unsigned> (rline_[n_]) << "), ";
       for (]b4_int_type_for([b4_prhs])[ i = prhs_[n_];
           0 <= rhs_[i]; ++i)
        YYCDEBUG << name_[rhs_[i]] << ' ';