error: expected declaration specifiers before 'ATTRIBUTE_RETURNS_NONNULL'

Shaun Jackman sjackman@gmail.com
Fri Aug 29 19:33:00 GMT 2014


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



More information about the Gcc-help mailing list