]> git.saurik.com Git - bison.git/commitdiff
* src/bison.simple (yyparse): Don't take the address of an
authorRobert Anisko <robert@lrde.epita.fr>
Wed, 29 Aug 2001 12:21:38 +0000 (12:21 +0000)
committerRobert Anisko <robert@lrde.epita.fr>
Wed, 29 Aug 2001 12:21:38 +0000 (12:21 +0000)
item before the start of an array, as that doesn't conform to
the C Standard.

ChangeLog
src/bison.simple

index 3fe071ee0b1c8f986cf018019d14e612c165de22..a0bed31b5db621d6e158e13c00efea623160f2af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-08-29  Paul Eggert  <eggert@twinsun.com>
+
+       * 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.
+       
 2001-08-29  Robert Anisko  <anisko_r@epita.fr>
 
        * doc/bison.texinfo (Location Tracking Calc): New node.
index f8f026ca70915265e2c5f9dce56dbca5bbb7a492..be6974d706424bade973b9297ab3f559cb055d20 100644 (file)
@@ -343,21 +343,24 @@ 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;
 
 /*------------------------------------------------------------.
 | yynewstate -- Push a new state, which is found in yystate.  |
 `------------------------------------------------------------*/
-yynewstate:
+ 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)
     {