bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bison patch for glr.c enum warnings


From: Paul Eggert
Subject: Bison patch for glr.c enum warnings
Date: Tue, 12 Nov 2002 23:49:07 -0800 (PST)

I installed the following patch into Bison to fix one of the problems
reported by Nelson H.F. Beebe in
<http://mail.gnu.org/pipermail/bug-bison/2002-November/001872.html>.

2002-11-12  Paul Eggert  <address@hidden>

        * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
        (yyglrReduce): Return yyok, not 0.
        This should avoid the enumerated-type warnings reported
        by Nelson H.F. Beebe in
        <http://mail.gnu.org/pipermail/bug-bison/2002-November/001872.html>.

Index: data/glr.c
===================================================================
RCS file: /cvsroot/bison/bison/data/glr.c,v
retrieving revision 1.34
diff -p -u -r1.34 glr.c
--- data/glr.c  13 Nov 2002 06:48:18 -0000      1.34
+++ data/glr.c  13 Nov 2002 07:43:15 -0000
@@ -1022,7 +1022,7 @@ yyglrShiftDefer (yyGLRStack* yystack, in
  *  have been previously resolved. Set *VALP to the resulting value,
  *  and *LOCP to the computed location (if any).  Return value is as
  *  for userAction. */
-static inline int
+static inline YYRESULTTAG
 yydoAction (yyGLRStack* yystack, int yyk, yyRuleNum yyrule,
            YYSTYPE* yyvalp, YYLTYPE* yylocp]b4_user_formals[)
 {
@@ -1168,7 +1168,7 @@ yyglrReduce (yyGLRStack* yystack, size_t
                    yymarkStackDeleted (yystack, yyk);
                    YYDPRINTF ((stderr, "Merging stack %d into stack %d.\n",
                                yyk, yyi));
-                   return 0;
+                   return yyok;
                  }
                yyp = yyp->yypred;
              }
@@ -1176,7 +1176,7 @@ yyglrReduce (yyGLRStack* yystack, size_t
       yystack->yytops.yystates[yyk] = yys;
       yyglrShiftDefer (yystack, yyk, yynewLRState, yyposn, yys0, 
yyrule]b4_pure_args[);
     }
-  return 0;
+  return yyok;
 }
 
 static int




reply via email to

[Prev in Thread] Current Thread [Next in Thread]