From 38e616f0f56514c392e21b62e832945ed74ddbbb Mon Sep 17 00:00:00 2001 From: Robert Anisko Date: Wed, 29 Aug 2001 12:21:38 +0000 Subject: [PATCH] * 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. --- ChangeLog | 6 ++++++ src/bison.simple | 11 +++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3fe071ee..a0bed31b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-08-29 Paul Eggert + + * 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 * doc/bison.texinfo (Location Tracking Calc): New node. diff --git a/src/bison.simple b/src/bison.simple index f8f026ca..be6974d7 100644 --- a/src/bison.simple +++ b/src/bison.simple @@ -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) { -- 2.50.0