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.
2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
+ * 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.
+
+
* data/m4sugar/m4sugar.m4 (_m4_map): New macro.
(m4_map, m4_map_sep): Use it. Handle the empty list correctly.
[[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";
[[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)
# endif
#endif
+/* Suppress unused-variable warnings by "using" E. */
+#define YYUSE(e) do {;} while (/*CONSTCOND*/ yyfalse && (e))
+
#ifndef YYFREE
# define YYFREE free
#endif
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
- while (0)
+ while (/*CONSTCOND*/ 0)
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
#define YYCHK(YYE) \
do { YYRESULTTAG yyflag = YYE; if (yyflag != yyok) return yyflag; } \
- while (0)
+ while (/*CONSTCOND*/ 0)
#if YYDEBUG
do { \
if (yydebug) \
YYFPRINTF Args; \
-} while (0)
+} while (/*CONSTCOND*/ 0)
]b4_yysymprint_generate([b4_c_ansi_function_def])[
Type, Value]b4_location_if([, Location])[); \
YYFPRINTF (stderr, "\n"); \
} \
-} while (0)
+} while (/*CONSTCOND*/ 0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
static void
yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1)
{
- /* Suppress unused-variable warnings. */
- yy0 = yy0;
- yy1 = yy1;
+ YYUSE (yy0);
+ YYUSE (yy1);
switch (yyn)
{
do { \
if (yydebug) \
yy_reduce_print (K, Rule); \
-} while (0)
+} while (/*CONSTCOND*/ 0)
/*----------------------------------------------------------.
| Report that the RULE is going to be reduced on stack #K. |
yyreportAmbiguity (yySemanticOption* yyx0, yySemanticOption* yyx1,
yyGLRStack* yystack]b4_pure_formals[)
{
- /* Suppress unused-variable warnings. */
- yyx0 = yyx0;
- yyx1 = yyx1;
+ YYUSE (yyx0);
+ YYUSE (yyx1);
#if YYDEBUG
YYFPRINTF (stderr, "Ambiguity detected.\n");
yyreportSyntaxError (yyGLRStack* yystack,
YYSTYPE* yylvalp, YYLTYPE* yyllocp]b4_user_formals[)
{
- /* Suppress unused-variable warnings. */
- yylvalp = yylvalp;
- yyllocp = yyllocp;
+ YYUSE (yylvalp);
+ YYUSE (yyllocp);
if (yystack->yyerrState == 0)
{
default: \
goto yybuglab; \
} \
- } while (0)
+ } while (/*CONSTCOND*/ 0)
/*----------.
{ \
(Current).begin = (Current).end = (Rhs)[0].end; \
} \
-} while (0)
+} while (false)
#endif
namespace yy
# endif
#endif
+/* Suppress unused-variable warnings by "using" E. */
+#define YYUSE(e) do {;} while (false && (e))
+
/* A pseudo ostream that takes yydebug_ into account. */
# define YYCDEBUG \
for (bool yydebugcond_ = yydebug_; yydebugcond_; yydebugcond_ = false) \
yysymprint_ ((Type), (Value), (Location)); \
*yycdebug_ << std::endl; \
} \
-} while (0)
+} while (false)
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug_) \
yyreduce_print_ (Rule); \
-} while (0)
+} while (false)
# define YY_STACK_PRINT() \
do { \
if (yydebug_) \
yystack_print_ (); \
-} while (0)
+} while (false)
#else /* !YYDEBUG */
/* Backward compatibility, but should be removed eventually. */
std::ostream& cdebug_ = *yycdebug_;
- /* Suppress unused-variable warnings. */
- if (false)
- yysymprint_ (yytype + !&cdebug_, yyvaluep, yylocationp);
+ YYUSE (!&cdebug_);
+ YYUSE (yylocationp);
+ YYUSE (yyvaluep);
*yycdebug_ << (yytype < yyntokens_ ? "token" : "nterm")
<< ' ' << yytname_[yytype] << " ("
yy::]b4_parser_class_name[::yydestruct_ (const char* yymsg,
int yytype, semantic_type* yyvaluep, location_type* yylocationp)
{
- /* Suppress unused-variable warnings. */
- if (false)
- yydestruct_ (yymsg, yytype, yyvaluep, yylocationp);
+ YYUSE (yylocationp);
+ YYUSE (yymsg);
+ YYUSE (yyvaluep);
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
# endif
#endif
+/* Suppress unused-variable warnings by "using" E. */
+#define YYUSE(e) do {;} while (/*CONSTCOND*/ 0 && (e))
+
#if ! defined (yyoverflow) || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
- while (0)
+ while (/*CONSTCOND*/ 0)
# endif
# endif
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
- while (0)
+ while (/*CONSTCOND*/ 0)
#endif
yyerror (]b4_yyerror_args[YY_("syntax error: cannot back up")); \
YYERROR; \
} \
-while (0)
+while (/*CONSTCOND*/ 0)
#define YYTERROR 1
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
- while (0)
+ while (/*CONSTCOND*/ 0)
#endif
do { \
if (yydebug) \
YYFPRINTF Args; \
-} while (0)
+} while (/*CONSTCOND*/ 0)
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
do { \
Type, Value]b4_location_if([, Location])[); \
YYFPRINTF (stderr, "\n"); \
} \
-} while (0)
+} while (/*CONSTCOND*/ 0)
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
-} while (0)
+} while (/*CONSTCOND*/ 0)
/*------------------------------------------------.
do { \
if (yydebug) \
yy_reduce_print (Rule); \
-} while (0)
+} while (/*CONSTCOND*/ 0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
/* Pacify compilers like GCC when the user code never invokes
YYERROR and the label yyerrorlab therefore never appears in user
code. */
- if (0)
+ if (/*CONSTCOND*/ 0)
goto yyerrorlab;
]b4_location_if([[ yyerror_range[0] = yylsp[1-yylen];