bison-patches
[Top][All Lists]
Advanced

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

[bison-1_29-branch] simple.patch


From: marc-alexandre autret
Subject: [bison-1_29-branch] simple.patch
Date: Wed, 29 Aug 2001 15:26:56 +0000 (GMT)

Another one.


2001-08-17  Paul Eggert  <address@hidden>

        * src/bison.simple (yyparse): Don't take the address of an
        item before the start of an array, as that doesn't conform to
        the C Standard.

===================================================================
RCS file: src/bison.simple,v
retrieving revision 1.28.3.0
retrieving revision 1.28.3.1
diff -pu -r1.28.3.0 -r1.28.3.1
--- src/bison.simple    2001/08/15 07:56:20     1.28.3.0
+++ src/bison.simple    2001/08/17 23:58:49     1.28.3.1
@@ -343,11 +343,12 @@ yyparse (YYPARSE_PARAM_ARG)
      so that they stay on the same level as the state stack.
      The wasted elements are never initialized.  */
 
-  yyssp = yyss - 1;
+  yyssp = yyss;
   yyvsp = yyvs;
 #if YYLSP_NEEDED
   yylsp = yyls;
 #endif
+  goto yysetstate;
 
 
 /*------------------------------------------------------------.
@@ -357,7 +358,10 @@ yynewstate:
   /* In all cases, when you get here, the value and location stacks
      have just been pushed. so pushing a state here evens the stacks.
      */
-  *++yyssp = yystate;
+  yyssp++;
+
+yysetstate:
+  *yyssp = yystate;
 
   if (yyssp >= yyss + yystacksize - 1)
     {



-- 
Autret Marc (address@hidden)
Eleve Ingenieur en Informatique.



reply via email to

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