This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error: expected declaration specifiers before 'ATTRIBUTE_RETURNS_NONNULL'


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]