X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/5a35a6cb7199aa58dc0b0cc6386872f5da18e1fe..090c5ebfa813d77aa5f57e6e249ac1cfbc1d36ad:/src/bison.s1 diff --git a/src/bison.s1 b/src/bison.s1 index bc656245..aee33e27 100644 --- a/src/bison.s1 +++ b/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