* data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'

rather than a for-loop that declares a local bool variable.
This commit is contained in:
Paul Eggert
2006-07-12 18:01:19 +00:00
parent a5d80ba505
commit db7e5eb5ef
2 changed files with 12 additions and 4 deletions

View File

@@ -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.
@@ -4073,7 +4083,7 @@
* 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

View 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