From: Akim Demaille Date: Wed, 19 Feb 2003 14:55:14 +0000 (+0000) Subject: * data/lalr1.cc: When displaying a line number, be sure to make it X-Git-Tag: BISON-2_0~391 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/0d1c3a04b76293183f5b1a1dcd3ac99e71de66c6?hp=60a777aa240edc33c9b42f38c5abc1d32ae39e26 * data/lalr1.cc: When displaying a line number, be sure to make it an int. --- diff --git a/ChangeLog b/ChangeLog index e092838d..679e762d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-02-19 Akim Demaille + + * data/lalr1.cc: When displaying a line number, be sure to make it + an int. + 2003-02-19 Akim Demaille * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_): diff --git a/data/lalr1.cc b/data/lalr1.cc index 214adb27..14864220 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -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 (rline_[n_]) << "), "; for (]b4_int_type_for([b4_prhs])[ i = prhs_[n_]; 0 <= rhs_[i]; ++i) YYCDEBUG << name_[rhs_[i]] << ' ';