This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Question: bison 2.4.1 breaks binutils/ld/deffilep.y, with fix
Le 28 avr. 09 à 20:55, Danny Backx a écrit :
On Tue, 2009-04-28 at 14:46 -0400, Joel E. Denny wrote:
On Tue, 28 Apr 2009, Danny Backx wrote:
I didn't recognize the significance of this earlier. If the token
STACKSIZE is conflicting with a system header in MacOS, perhaps a
better
fix is to rename STACKSIZE in the .y and update any uses
elsewhere. Have
you tried that yet?
Your current patch lets the system header symbol be redefined, and so
there should still be a warning even though the error goes away. I
don't
know what the effect of redefining that header symbol is.
I'd say the backward incompatibility here is really in MacOS.
Bison's
backward incompatibility just converted the important warning into an
error.
My compliments for reading this so thoroughly ! (not kidding !)
You're right, the original issue was that STACKSIZE is getting defined
twice, that's a MacOS change. The suggestion by H-P from the binutils
list was to #undef STACKSIZE between the system includes and the
(bison
generated) definition.
Thanks for all your input, I think the next question now is whether
the
binutils crew wants to see a fix like this coming.
FWIW, Bison 2.6 will provide a means to add a prefix to token names
when defined in C. So the grammar file can still use "STACKSIZE"
while the token will be defined as "<PREFIX>STACKSIZE" in the C files.