]> git.saurik.com Git - bison.git/commitdiff
glr.cc: fix the handling of yydebug
authorAkim Demaille <akim@lrde.epita.fr>
Thu, 26 Jul 2012 14:44:45 +0000 (16:44 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Thu, 26 Jul 2012 15:03:52 +0000 (17:03 +0200)
* data/glr.cc (yydebug_): Remove, unused.
(set_debug_level, debug_level): Work on yydebug instead.
* doc/bison.texi, NEWS: Document this.

NEWS
data/glr.cc

diff --git a/NEWS b/NEWS
index f4decfa821e6614f28ea8544312852b389a00cc7..b97956cccf16b923dd3ab87b04b703f1bba58f4c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,7 +6,9 @@ GNU Bison NEWS
 
 ** Bug fixes
 
-  Type names are now properly escaped.
+*** Type names are now properly escaped.
+
+*** glr.cc: set_debug_level and debug_level work as expected.
 
 * Noteworthy changes in release 2.6 (2012-07-19) [stable]
 
index ba6ceac0da68a4e3259f988d98ad3604c00664c3..78a7ae519ad0b902a1a3e67e2fc5b51f83067d1a 100644 (file)
@@ -131,7 +131,7 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
   ]b4_parser_class_name::b4_parser_class_name[ (]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
     :])[
 #if ]b4_api_PREFIX[DEBUG
-    ]m4_ifset([b4_parse_param], [  ], [ :])[yydebug_ (false),
+    ]m4_ifset([b4_parse_param], [  ], [ :])[
       yycdebug_ (&std::cerr)]m4_ifset([b4_parse_param], [,])[
 #endif]b4_parse_param_cons[
   {
@@ -199,13 +199,14 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
   ]b4_parser_class_name[::debug_level_type
   ]b4_parser_class_name[::debug_level () const
   {
-    return yydebug_;
+    return yydebug;
   }
 
   void
   ]b4_parser_class_name[::set_debug_level (debug_level_type l)
   {
-    yydebug_ = l;
+    // Actually, it is yydebug which is really used.
+    yydebug = l;
   }
 
 #endif
@@ -320,7 +321,6 @@ b4_user_stype
                                    const location_type* yylocationp);
   private:
     /* Debugging.  */
-    int yydebug_;
     std::ostream* yycdebug_;
 # endif