bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/9] lalr1.cc: don't leave macros define to nothing


From: Akim Demaille
Subject: [PATCH 2/9] lalr1.cc: don't leave macros define to nothing
Date: Tue, 2 Oct 2012 19:11:07 +0200

* data/lalr1.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT, YY_STACK_PRINT):
Define to something so that, for instance, "if (foo) YY_SYMBOL_PRINT"
is valid even when !YYDEBUG.
---
 data/lalr1.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/data/lalr1.cc b/data/lalr1.cc
index 82e6824..308290a 100644
--- a/data/lalr1.cc
+++ b/data/lalr1.cc
@@ -335,9 +335,9 @@ do {                                        \
 #else /* !]b4_api_PREFIX[DEBUG */
 
 # define YYCDEBUG if (false) std::cerr
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_REDUCE_PRINT(Rule)
-# define YY_STACK_PRINT()
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) YYUSE(Type)
+# define YY_REDUCE_PRINT(Rule)        static_cast<void>(0)
+# define YY_STACK_PRINT()             static_cast<void>(0)
 
 #endif /* !]b4_api_PREFIX[DEBUG */
 
-- 
1.7.12.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]