[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison 1.28 problem with gcc -Wall
From: |
Akim Demaille |
Subject: |
Re: bison 1.28 problem with gcc -Wall |
Date: |
02 Oct 2000 12:35:38 +0200 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
Thanks, applied!
Akim
| From: Jim Meyering <address@hidden>
| Date: 30 Aug 1999 22:44:47 +0200
|
| Your patch breaks bison because its comment violates this rule:
|
| /* Note: there must be only one dollar sign in this file.
|
| Sorry about that; I didn't recall that rule. Here is a revised patch.
|
| 1999-08-30 Paul Eggert <address@hidden>
|
| * bison.s1 (yyparse): Assign the default value
| unconditionally, to avoid a GCC warning and make the parser a
| tad smaller.
|
| ===================================================================
| RCS file: bison.s1,v
| retrieving revision 1.28.0.1
| retrieving revision 1.28.0.3
| diff -pu -r1.28.0.1 -r1.28.0.3
| --- bison.s1 1999/08/30 19:23:24 1.28.0.1
| +++ bison.s1 1999/08/30 21:15:18 1.28.0.3
| @@ -523,8 +523,14 @@ yydefault:
| /* Do a reduction. yyn is the number of a rule to reduce with. */
| yyreduce:
| yylen = yyr2[yyn];
| - if (yylen > 0)
| - yyval = yyvsp[1-yylen]; /* implement default value of the action */
| +
| + /* If yylen is nonzero, implement the default value of the action.
| + 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];
|
| #if YYDEBUG != 0
| if (yydebug)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: bison 1.28 problem with gcc -Wall,
Akim Demaille <=