bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: line nums in C++


From: Akim Demaille
Subject: FYI: line nums in C++
Date: Wed, 19 Feb 2003 15:54:52 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2

Index: ChangeLog
from   2003-02-19  Akim Demaille  <address@hidden>

        * data/lalr1.cc: When displaying a line number, be sure to make it
        an int.

Index: data/lalr1.cc
===================================================================
RCS file: /cvsroot/bison/bison/data/lalr1.cc,v
retrieving revision 1.24
diff -u -u -r1.24 lalr1.cc
--- data/lalr1.cc 19 Feb 2003 14:33:27 -0000 1.24
+++ data/lalr1.cc 19 Feb 2003 14:54:37 -0000
@@ -429,8 +429,11 @@
 #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]] << ' ';




reply via email to

[Prev in Thread] Current Thread [Next in Thread]