This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: build failure of gold (trunk)
- From: Ian Lance Taylor <iant at google dot com>
- To: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- Cc: binutils at sourceware dot org
- Date: Fri, 04 Mar 2011 10:44:35 -0800
- Subject: Re: build failure of gold (trunk)
- References: <87hbbiyg31.fsf@gauss.cs.tamu.edu>
Gabriel Dos Reis <gdr@cs.tamu.edu> writes:
> A fresh check out of CVS gold fails to build with the following error:
>
> In file included from
> /home/gdr/src/sourceware/src/gold/expression.cc:33:0:
> /home/gdr/src/sourceware/src/gold/script-c.h:221:7: error: âyylexâ initialized and declared âexternâ
> /home/gdr/src/sourceware/src/gold/script-c.h:221:7: error: âYYSTYPEâ was not declared in this scope
> /home/gdr/src/sourceware/src/gold/script-c.h:221:15: error: expected primary-expression before â,â token
> /home/gdr/src/sourceware/src/gold/script-c.h:221:17: error: expected primary-expression before âvoidâ
> /home/gdr/src/sourceware/src/gold/script-c.h:221:30: error: initializer expression list treated as compound expression
>
>
> this is with GCC-4.5.0.
What version of bison do you have installed on your system?
It looks like YYSTYPE is not defined in the generated file yyscript.h.
That file is generated by bison. The definition should look like
typedef union YYSTYPE
{
...
} YYSTYPE;
Ian