Bug 125672 - missing parentheses in YYLLOC_DEFAULT macro in data/yacc.c
Summary: missing parentheses in YYLLOC_DEFAULT macro in data/yacc.c
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bison   
(Show other bugs)
Version: 2
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Roland McGrath
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-09 21:18 UTC by Jozef
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-06-09 22:03:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Jozef 2004-06-09 21:18:02 UTC
Description of problem:
in bison-1.875c-1, in data/yacc.c
line 993 should be:
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);])[
instead of
YYLLOC_DEFAULT (yyloc, yylsp - yylen, yylen);])[

(parentheses around the second argument of the macro).

Note that in version 1.851 from the bison gnu website it is like the
correct line. 

Version-Release number of selected component (if applicable):
1.875c-1

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:
compiler gives: error: subscripted value is neither array nor pointer
because yylen is used as a subscripted value.

Expected results:


Additional info:

Comment 1 Roland McGrath 2004-06-09 21:20:34 UTC
Please supply an actual test case that is broken by the current code.

Comment 2 Jozef 2004-06-09 22:03:54 UTC
Have to make apologies.. somewhere in another file of ours, the 
YYLLOC_DEFAULT macro was overwritten. We used an bison 1.35 before,
but since the parentheses moved to the macro def instead of the use,
it broke with our redefine and the new bison.

Will look more closely in the future.

thanks,
Jozef Kruger


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