Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 92262

Summary: bison skeleton does not compile as c++
Product: [Retired] Red Hat Raw Hide Reporter: Alexander Larsson <alexl>
Component: bisonAssignee: Roland McGrath <roland>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: john.ellson
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.875-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-09-24 19:42:22 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:
Bug Depends On:    
Bug Blocks: 100643    

Description Alexander Larsson 2003-06-04 10:07:50 UTC
Building pwlib with bison-1.875-2 fails, because it uses the bison parser with g++.
The following code in yacc.c fails:

/*----------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action.  |
`----------------------------------------------------*/
yyerrlab1:

  /* Suppress GCC warning that yyerrlab1 is unused when no action
     invokes YYERROR.  */
#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
  __attribute__ ((__unused__))
#endif

]b4_location_if([  yylerrsp = yylsp;
  *++yylerrsp = yyloc;])[
  goto yyerrlab2;


since __attribute__ ((__unused__)) doesn't work in C++. I propose adding
!defined (_CPLUSPLUS_) or something.

Comment 1 Alexander Larsson 2003-06-04 10:08:48 UTC
(the attribute doesn't work for labels i mean)


Comment 2 Alexander Larsson 2003-06-04 10:13:50 UTC
(And i meant __cplusplus__ obviously)

Comment 3 Bill Nottingham 2003-07-24 22:49:06 UTC
*** Bug 92377 has been marked as a duplicate of this bug. ***

Comment 4 Roland McGrath 2003-09-24 19:42:22 UTC
hp committed the patch to fix C++ in the 1.875-3 rpm