mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
skeletons: simplify the protections against "unused" warnings.
* data/c.m4 (b4_parse_param_use): Also accept optional arguments to "use". Simplify callers. * data/glr.c (yyuserAction): Simplify use of b4_parse_param_use. (yy_reduce_print): Don't use b4_parse_param_use, as all the arguments _are_ used. * data/lalr1.cc (YY_SYMBOL_PRINT): Even when disabled, "use" the symbol argument. This neutralizes a warning in yypush_ when there are no symbols with a semantic values. (yy_destroy_): Remove useless "use" of yymsg.
This commit is contained in:
@@ -441,7 +441,7 @@ b4_percent_code_get[]dnl
|
||||
#else /* !YYDEBUG */
|
||||
|
||||
# define YYCDEBUG if (false) std::cerr
|
||||
# define YY_SYMBOL_PRINT(Title, Symbol) static_cast<void>(0)
|
||||
# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE(Symbol)
|
||||
# define YY_REDUCE_PRINT(Rule) static_cast<void>(0)
|
||||
# define YY_STACK_PRINT() static_cast<void>(0)
|
||||
|
||||
@@ -545,7 +545,6 @@ b4_percent_code_get[]dnl
|
||||
symbol_base_type<Exact>& yysym) const
|
||||
{
|
||||
int yytype = yysym.type_get ();
|
||||
YYUSE (yymsg);
|
||||
if (yymsg)
|
||||
YY_SYMBOL_PRINT (yymsg, yysym);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user