]> git.saurik.com Git - bison.git/commitdiff
* data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 12 Jul 2006 18:01:19 +0000 (18:01 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 12 Jul 2006 18:01:19 +0000 (18:01 +0000)
rather than a for-loop that declares a local bool variable.

ChangeLog
data/lalr1.cc

index 3716802a8d27fd73e8ec66d369099d9676cc999f..f57b40ac7c617f3d7f40383a2766a6e127cf04f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-07-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
+       rather than a for-loop that declares a local bool variable.  This
+       should work around a compatibility problem with a Cray x1e C++
+       compiler reported by Hung Nguyen in
+       <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
+       The for-loop was introduced in the 2004-11-17 change but I don't
+       know why it was needed.
+
 2006-07-12  Akim Demaille  <akim@epita.fr>
 
        * data/c.m4: Comment changes.
 
        * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
 
-2004-10-28  Akim Demaille  <akim@epita.fr>,
+2004-11-17  Akim Demaille  <akim@epita.fr>,
            Alexandre Duret-Lutz <adl@gnu.org>
 
        * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
index 000cd0d1efee39aa44cde10fbddbfd889ae58ccb..25b9160cb87b728ecc2360e17a2721fae6c3a4ea 100644 (file)
@@ -336,9 +336,7 @@ b4_defines_if([
 #define YYUSE(e) ((void) (e))
 
 /* A pseudo ostream that takes yydebug_ into account.  */
-# define YYCDEBUG                                                      \
-  for (bool yydebugcond_ = yydebug_; yydebugcond_; yydebugcond_ = false)       \
-    (*yycdebug_)
+# define YYCDEBUG if (yydebug_) (*yycdebug_)
 
 /* Enable debugging if requested.  */
 #if YYDEBUG