]> git.saurik.com Git - bison.git/blobdiff - data/glr.c
"Use" parse parameters.
[bison.git] / data / glr.c
index f427cfa9ade0d1aab5fd37f1e76b4c83fd5bb3c3..626af41d522f9c10b8f9b9fffba80cfc88717896 100644 (file)
@@ -257,7 +257,11 @@ b4_syncline([@oline@], [@ofile@])
 #endif
 
 /* Suppress unused-variable warnings by "using" E.  */
-#define YYUSE(e) do {;} while (/*CONSTCOND*/ yyfalse && (e))
+#if __cplusplus
+# define YYUSE(e) (void) (e)
+#else
+# define YYUSE(e) do {;} while (/*CONSTCOND*/ yyfalse && (e))
+#endif
 
 #ifndef YYFREE
 # define YYFREE free
@@ -783,7 +787,9 @@ struct yyGLRStack {
   yyGLRStateSet yytops;
 };
 
+#if YYSTACKEXPANDABLE
 static void yyexpandGLRStack (yyGLRStack* yystack);
+#endif
 
 static void yyFail (yyGLRStack* yystack]b4_pure_formals[, const char* yymsg)
   __attribute__ ((__noreturn__));
@@ -866,8 +872,8 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
   yybool yynormal __attribute__ ((__unused__)) =
     (yystack->yysplitPoint == NULL);
   int yylow;
-
-# undef yyerrok
+]b4_parse_param_use[]dnl
+[# undef yyerrok
 # define yyerrok (yystack->yyerrState = 0)
 # undef YYACCEPT
 # define YYACCEPT return yyaccept
@@ -1370,7 +1376,10 @@ yy_reduce_print (yyGLRStack* yystack, size_t yyk, yyRuleNum yyrule,
   yyGLRStackItem* yyvsp = (yyGLRStackItem*) yystack->yytops.yystates[yyk];
   int yylow = 1;
   int yyi;
-  YYFPRINTF (stderr, "Reducing stack %lu by rule %d (line %lu):\n",
+  YYUSE (yyvalp);
+  YYUSE (yylocp);
+]b4_parse_param_use[]dnl
+[  YYFPRINTF (stderr, "Reducing stack %lu by rule %d (line %lu):\n",
             (unsigned long int) yyk, yyrule - 1,
             (unsigned long int) yyrline[yyrule]);
   /* Print the symbols being reduced, and their result.  */