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 - bison skeleton does not compile as c++
Summary: bison skeleton does not compile as c++
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: bison
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Roland McGrath
QA Contact:
URL:
Whiteboard:
: 92377 (view as bug list)
Depends On:
Blocks: CambridgeBlocker
TreeView+ depends on / blocked
 
Reported: 2003-06-04 10:07 UTC by Alexander Larsson
Modified: 2007-04-18 16:54 UTC (History)
1 user (show)

Fixed In Version: 1.875-3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-09-24 19:42:22 UTC
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.