[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/4] c++: better silencing of warnings
From: |
Theophile Ranquet |
Subject: |
[PATCH 3/4] c++: better silencing of warnings |
Date: |
Mon, 21 Jan 2013 12:46:28 +0100 |
* tests/c++.at (C++ GLR parser identifier shadowing): Don't name unused
arguments, this is legal in C++.
---
tests/c++.at | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/c++.at b/tests/c++.at
index ad08b8a..0bebe8a 100644
--- a/tests/c++.at
+++ b/tests/c++.at
@@ -781,14 +781,15 @@ exp: ZERO
int yylex (yy::parser::semantic_type *yylval)
{
- (void) *yylval;
+ // Note: this argument is unused, but named on purpose. There used to be a
+ // bug with a macro that erroneously expanded this identifier to
+ // yystackp->yyval.
+ YYUSE (yylval);
return yy::parser::token::ZERO;
}
-void yy::parser::error (std::string const& msg)
-{
- (void) msg;
-}
+void yy::parser::error (std::string const&)
+{}
int main()
{}
--
1.8.1.1
[PATCH 2/4] bench: compatibility for Bison <= 2.7, Theophile Ranquet, 2013/01/21