From db7e5eb5ef7500d9a4dd98a67909d0cf9fc3b025 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 12 Jul 2006 18:01:19 +0000 Subject: [PATCH] * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)' rather than a for-loop that declares a local bool variable. --- ChangeLog | 12 +++++++++++- data/lalr1.cc | 4 +--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3716802a..f57b40ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-07-12 Paul Eggert + + * 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 + . + 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 * data/c.m4: Comment changes. @@ -4073,7 +4083,7 @@ * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings. -2004-10-28 Akim Demaille , +2004-11-17 Akim Demaille , Alexandre Duret-Lutz * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow diff --git a/data/lalr1.cc b/data/lalr1.cc index 000cd0d1..25b9160c 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -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 -- 2.47.2