bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-cpio] Patch: compile cpio 2.9 with new gcc 4.3


From: Ladislav Michnovič
Subject: Re: [Bug-cpio] Patch: compile cpio 2.9 with new gcc 4.3
Date: Tue, 25 Sep 2007 14:32:48 +0200

2007/9/25, Sergey Poznyakoff <address@hidden>:
> Ladislav Michnovi­ <address@hidden> ha escrit:
>
> >  I am attaching patch which fixes problems when compiling with new gcc
> >  4.3.
>
> What kind of problems?

Compilation stops on error. The details are on this webpage:
http://en.opensuse.org/GCC_4.3_Transition

C99 inline semantics changes.  If you use 'extern inline foo(....' in
  headers and build with either -std=c99 or -std=gnu99 then you will
  probably face linker errors complaining about duplicate symbols.

  If you want to fix this in a way that is compatible with GCC 4.3 and
  previous versions use something like the following:

       extern inline
       #ifdef __GNU_STDC_INLINE__
       __attribute__((__gnu_inline__))
       #endif
       foo(....

  which will preserve the previous semantics.  If you do not care about
  compatibility with older GCC and want to use C99 semantics simply
  remove the 'extern' qualifier on inline functions defined in headers.

--
Regards Ladislav.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]