mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 18:23:03 +00:00
* 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:
@@ -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>
|
2000-10-02 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* src/getargs.c (getargs): Don't dump `--help' on unrecognized
|
* src/getargs.c (getargs): Don't dump `--help' on unrecognized
|
||||||
|
|||||||
14
src/bison.s1
14
src/bison.s1
@@ -558,10 +558,16 @@ yydefault:
|
|||||||
yyreduce:
|
yyreduce:
|
||||||
/* yyn is the number of a rule to reduce with. */
|
/* yyn is the number of a rule to reduce with. */
|
||||||
yylen = yyr2[yyn];
|
yylen = yyr2[yyn];
|
||||||
/* Implement default value of the action:
|
|
||||||
`{dollar}{dollar} = {dollar}1'. */
|
/* If YYLEN is nonzero, implement the default value of the action:
|
||||||
if (yylen > 0)
|
`{dollar}{dollar} = {dollar}1'.
|
||||||
yyval = yyvsp[1-yylen];
|
|
||||||
|
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
|
#ifdef YYLSP_NEEDED
|
||||||
/* Implement default location. If the rhs is empty, extend YYLOC to
|
/* Implement default location. If the rhs is empty, extend YYLOC to
|
||||||
YYLLOC, which corresponds to the current token, otherwise
|
YYLLOC, which corresponds to the current token, otherwise
|
||||||
|
|||||||
@@ -558,10 +558,16 @@ yydefault:
|
|||||||
yyreduce:
|
yyreduce:
|
||||||
/* yyn is the number of a rule to reduce with. */
|
/* yyn is the number of a rule to reduce with. */
|
||||||
yylen = yyr2[yyn];
|
yylen = yyr2[yyn];
|
||||||
/* Implement default value of the action:
|
|
||||||
`{dollar}{dollar} = {dollar}1'. */
|
/* If YYLEN is nonzero, implement the default value of the action:
|
||||||
if (yylen > 0)
|
`{dollar}{dollar} = {dollar}1'.
|
||||||
yyval = yyvsp[1-yylen];
|
|
||||||
|
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
|
#ifdef YYLSP_NEEDED
|
||||||
/* Implement default location. If the rhs is empty, extend YYLOC to
|
/* Implement default location. If the rhs is empty, extend YYLOC to
|
||||||
YYLLOC, which corresponds to the current token, otherwise
|
YYLLOC, which corresponds to the current token, otherwise
|
||||||
|
|||||||
Reference in New Issue
Block a user