* data/c.m4 (yydestruct, yysymprint):

Use YYUSE instead of casting to void.
* data/glr.c (YYUSE): New macro.
(yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
Use it instead of rolling our own.
(YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
(YYCHK1):
Use /*CONSTCOND*/ to suppress lint warnings.
* data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
(YY_STACK_PRINT): Use 'false' not '0'.
(YYUSE): New macro.
(yysymprint_, yydestruct_): Use it instead of rolling our own.
* data/yacc.c (YYUSE): New macro.
(YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
(YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
(yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
This commit is contained in:
Paul Eggert
2005-10-06 07:17:21 +00:00
parent 74e543d21f
commit 2a4647a32f
5 changed files with 62 additions and 40 deletions

View File

@@ -385,9 +385,8 @@ m4_define_default([b4_yydestruct_generate],
[[YYSTYPE *yyvaluep], [yyvaluep]]b4_location_if([,
[[YYLTYPE *yylocationp], [yylocationp]]]))[
{
/* Pacify ``unused variable'' warnings. */
(void) yyvaluep;
]b4_location_if([ (void) yylocationp;
YYUSE (yyvaluep);
]b4_location_if([ YYUSE (yylocationp);
])[
if (!yymsg)
yymsg = "Deleting";
@@ -420,9 +419,8 @@ m4_define_default([b4_yysymprint_generate],
[[YYSTYPE *yyvaluep], [yyvaluep]]b4_location_if([,
[[YYLTYPE *yylocationp], [yylocationp]]]))
{
/* Pacify ``unused variable'' warnings. */
(void) yyvaluep;
b4_location_if([ (void) yylocationp;
YYUSE (yyvaluep);
b4_location_if([ YYUSE (yylocationp);
])dnl
[
if (yytype < YYNTOKENS)