This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: error: expected declaration specifiers before 'ATTRIBUTE_RETURNS_NONNULL'
- From: Shaun Jackman <sjackman at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 29 Aug 2014 12:32:56 -0700
- Subject: Re: error: expected declaration specifiers before 'ATTRIBUTE_RETURNS_NONNULL'
- Authentication-results: sourceware.org; auth=none
- References: <CADX6M3p4VHY=ZAXrFjL8fRgaSSoFR0=EGs9r-yon0KmU9Mtq=Q at mail dot gmail dot com> <alpine dot DEB dot 2 dot 11 dot 1408290006570 dot 10188 at laptop-mg dot saclay dot inria dot fr>
- Reply-to: Shaun Jackman <sjackman at gmail dot com>
On 28 August 2014 15:12, Marc Glisse <marc.glisse@inria.fr> wrote:
> On Thu, 28 Aug 2014, Shaun Jackman wrote:
>
>> I'm seeing a strange error when compiling gcc --with-sysroot. So far
>> I've successfully (I think) installed the linux headers and compiled
>> and installed binutils and glibc for this sysroot. I'm working on GCC
>> now.
>>
>> libiberty.h:110:38: error: expected declaration specifiers before
>> 'ATTRIBUTE_RETURNS_NONNULL'
>
>
> Looks like binutils (?) is bringing its own slightly older version of
> ansidecl.h, and sadly gcc puts that -I flag before the one that would let it
> find its own ansidecl.h. Some workarounds could be (pick only one):
> * download a more recent binutils (a snapshot if there is no release)
> * replace the ansidecl.h installed by binutils by the one you can find in
> the gcc sources
> * temporarily rename the ansidecl.h installed by binutils
>
> --
> Marc Glisse
I opted for #3 `temporarily rename the ansidecl.h installed by
binutils`, and it worked nicely. Thanks for your help, Marc.
Cheers,
Shaun