* bison.s1 (yyparse): Assign the default value

unconditionally, to avoid a GCC warning and make the parser a
tad smaller.
This commit is contained in:
Akim Demaille
2000-10-02 10:29:00 +00:00
parent 8f52a1e790
commit da9abf4366
3 changed files with 26 additions and 8 deletions

View File

@@ -1,3 +1,9 @@
2000-10-02 Paul Eggert <eggert@twinsun.com>
* bison.s1 (yyparse): Assign the default value
unconditionally, to avoid a GCC warning and make the parser a
tad smaller.
2000-10-02 Akim Demaille <akim@epita.fr>
* src/getargs.c (getargs): Don't dump `--help' on unrecognized

View File

@@ -558,10 +558,16 @@ yydefault:
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* Implement default value of the action:
`{dollar}{dollar} = {dollar}1'. */
if (yylen > 0)
yyval = yyvsp[1-yylen];
/* If YYLEN is nonzero, implement the default value of the action:
`{dollar}{dollar} = {dollar}1'.
Otherwise, the following line sets YYVAL to the semantic value of
the lookahead token. This behavior is undocumented and Bison
users should not rely upon it. Assigning to YYVAL
unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
#ifdef YYLSP_NEEDED
/* Implement default location. If the rhs is empty, extend YYLOC to
YYLLOC, which corresponds to the current token, otherwise

View File

@@ -558,10 +558,16 @@ yydefault:
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* Implement default value of the action:
`{dollar}{dollar} = {dollar}1'. */
if (yylen > 0)
yyval = yyvsp[1-yylen];
/* If YYLEN is nonzero, implement the default value of the action:
`{dollar}{dollar} = {dollar}1'.
Otherwise, the following line sets YYVAL to the semantic value of
the lookahead token. This behavior is undocumented and Bison
users should not rely upon it. Assigning to YYVAL
unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
#ifdef YYLSP_NEEDED
/* Implement default location. If the rhs is empty, extend YYLOC to
YYLLOC, which corresponds to the current token, otherwise