From 782a05f9de1bad15438e7e64f163269308cc0f06 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 30 Oct 2002 05:38:30 +0000 Subject: [PATCH] (YYLEFTMOST_STATE): Remove. (yyreportTree): Use a stack-based leftmost state. This avoids our continuing battles with bogus warnings about initializers. --- data/glr.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/data/glr.c b/data/glr.c index 4d34e5f3..14185cf7 100644 --- a/data/glr.c +++ b/data/glr.c @@ -1284,17 +1284,6 @@ yyresolveAction (yySemanticOption* yyopt, yyGLRStack* yystack, } #if YYDEBUG -static yyGLRState YYLEFTMOST_STATE = - { - 0, 0, -1, NULL, 0, { NULL }, - /* yyloc. */ - { -#if YYLTYPE_IS_TRIVIAL -]b4_location_if([ 0, 0, 0, 0])[ -#endif - } - }; - static void yyreportTree (yySemanticOption* yyx, int yyindent) { @@ -1302,11 +1291,15 @@ yyreportTree (yySemanticOption* yyx, int yyindent) int yyi; yyGLRState* yys; yyGLRState* yystates[YYMAXRHS]; + yyGLRState yyleftmost_state; for (yyi = yynrhs, yys = yyx->yystate; 0 < yyi; yyi -= 1, yys = yys->yypred) yystates[yyi] = yys; if (yys == NULL) - yystates[0] = &YYLEFTMOST_STATE; + { + yyleftmost_state.yyposn = 0; + yystates[0] = &yyleftmost_state; + } else yystates[0] = yys; -- 2.47.2