From 0d1c3a04b76293183f5b1a1dcd3ac99e71de66c6 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 19 Feb 2003 14:55:14 +0000 Subject: [PATCH] * data/lalr1.cc: When displaying a line number, be sure to make it an int. --- ChangeLog | 5 +++++ data/lalr1.cc | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) 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]] << ' '; -- 2.45.2