Bug 125672 - missing parentheses in YYLLOC_DEFAULT macro in data/yacc.c
missing parentheses in YYLLOC_DEFAULT macro in data/yacc.c
Product: Fedora
Classification: Fedora
Component: bison (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Roland McGrath
Depends On:
  Show dependency treegraph
Reported: 2004-06-09 17:18 EDT by Jozef
Modified: 2007-11-30 17:10 EST (History)
0 users

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

Attachments (Terms of Use)

  None (edit)
Description Jozef 2004-06-09 17:18:02 EDT
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):

How reproducible:

Steps to Reproduce:
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 17:20:34 EDT
Please supply an actual test case that is broken by the current code.
Comment 2 Jozef 2004-06-09 18:03:54 EDT
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.

Jozef Kruger

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