mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 17:23:02 +00:00
tests: better silencing of unused argument warnings
input.yy:35:44: error: unused parameter 'msg' [-Werror,-Wunused-parameter]
void yy::parser::error (std::string const& msg)
^
* tests/c++.at (C++ GLR parser identifier shadowing): Don't name unused
argument, use YYUSE instead of a direct cast to void.
This commit is contained in:
11
tests/c++.at
11
tests/c++.at
@@ -781,14 +781,15 @@ exp: ZERO
|
|||||||
|
|
||||||
int yylex (yy::parser::semantic_type *yylval)
|
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;
|
return yy::parser::token::ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
void yy::parser::error (std::string const& msg)
|
void yy::parser::error (std::string const&)
|
||||||
{
|
{}
|
||||||
(void) msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{}
|
{}
|
||||||
|
|||||||
Reference in New Issue
Block a user