Bug 190376

Summary: generates bad definition in K&R C when yyparse has no arguments
Product: [Fedora] Fedora Reporter: John Ellson <john.ellson>
Component: bisonAssignee: Roland McGrath <roland>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.1-2.FC5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-05-02 18:19:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
source file triggering the problem none

Description John Ellson 2006-05-01 20:08:23 UTC
Description of problem:
bison after FC4 (bison-2.0-6) generates invalid code for the attached parser.y
Specifically at line 1223 of y.tab.c an incorrect ";" is introduced.

Version-Release number of selected component (if applicable):
bison-2.1-1.2.1

How reproducible:
100%

Steps to Reproduce:
1.bison -ydv parser.y
2.
3.
  
Actual results:
line 1223 of y.tab.c contains a ";"

Expected results:
no ";" on line 1123, like the blank line 1133 of y.tab.c generated by bison-2.0-6  


Additional info:
The relevant fragment of a "diff -ub y.tab.c.old y.tab.c.new"  is:

    @@ -1130,13 +1220,13 @@
     #else
     int
     yyparse ()
    -
    +    ;
     #endif
     #endif
     {

Comment 1 John Ellson 2006-05-01 20:08:23 UTC
Created attachment 128456 [details]
source file triggering the problem

Comment 2 John Ellson 2006-05-01 20:27:18 UTC
Sorry, typo in line number.  That should read:

no ";" on line 1223, like the blank line 1133 of y.tab.c generated by bison-2.0-6

Comment 3 Roland McGrath 2006-05-02 03:19:30 UTC
This seems to be a bug in the m4 macros that are part of 2.1 from upstream.
I'm testing out a patch.

Comment 4 Fedora Update System 2006-05-02 16:02:14 UTC
bison-2.1-2.FC5 has been pushed for fc5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Comment 5 John Ellson 2006-05-02 16:06:10 UTC
Thanks for fixing this.  Could you push into Fedora-devel as well please?

Comment 6 Roland McGrath 2006-05-02 18:19:44 UTC
There is a new rpm in rawhide also.