mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +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>
|
||||
|
||||
* src/getargs.c (getargs): Don't dump `--help' on unrecognized
|
||||
|
||||
14
src/bison.s1
14
src/bison.s1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user