summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel E. Denny <joeldenny@joeldenny.org>2011-04-16 18:26:18 -0400
committerJoel E. Denny <joeldenny@joeldenny.org>2011-04-16 18:26:18 -0400
commitc9e2da4f20c97c4cb53b68d4912dbdb8836df9a4 (patch)
treec2b4a7fd73856b098ee87e4564bd909c887e1374
parent55dd35633675f588c58ead46ecd6b5f4db504192 (diff)
downloadbison-c9e2da4f20c97c4cb53b68d4912dbdb8836df9a4.tar.gz
tests: pacify gcc 4.6.0's -Wunused-but-set-variable.
Reported by Jim Meyering at <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>. * tests/actions.at (Default %printer and %destructor for mid-rule values): Define YYLLOC_DEFAULT so that it uses its Rhs argument.
-rw-r--r--ChangeLog9
-rw-r--r--tests/actions.at2
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c63cb19..243ee1f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
+ tests: pacify gcc 4.6.0's -Wunused-but-set-variable.
+ Reported by Jim Meyering at
+ <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
+ * tests/actions.at
+ (Default %printer and %destructor for mid-rule values): Define
+ YYLLOC_DEFAULT so that it uses its Rhs argument.
+
+2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
+
glr.c: omit yyresolveLocations when locations are disabled.
This prevents gcc 4.6.0's -Wunused-but-set-variable from warning
about yyresolveLocations's local yyrhsloc. When locations are
diff --git a/tests/actions.at b/tests/actions.at
index 37616506..c95038ea 100644
--- a/tests/actions.at
+++ b/tests/actions.at
@@ -1199,7 +1199,7 @@ AT_DATA_GRAMMAR([[input.y]],
static int yylex (void);
# define USE(SYM)
# define YYLTYPE int
-# define YYLLOC_DEFAULT(Current, Rhs, N)
+# define YYLLOC_DEFAULT(Current, Rhs, N) (void)(Rhs)
# define YY_LOCATION_PRINT(File, Loc)
%}