Re: C++-compatible definitions of C99-style inline functions

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

 



On Fri, Jan 18, 2013 at 2:55 AM, Marc Glisse <marc.glisse@xxxxxxxx> wrote:
> On Thu, 17 Jan 2013, Solomon Gibbs wrote:
>
>> Hello,
>>
>> I have some C99 code used by C++11 application code. A few inline
>> functions are declared in the C99 style with code explicitly generated
>> in the translation unit using the C99 extern inline.
>>
>> However, when I try to use one of the inline functions in the C++
>> application, I get errors about multiple definitions at link time. It
>> seems that g++ is instantiating the inline code that already exists in
>> the library, despite the extern "C" specifier.
>
>
> Your issue seems specific to windows. On linux, gcc does instantiate the
> inline code, but it emits a weak symbol in app.o that is discarded at link
> time in favor of the strong one in buffer.o.
>
>

Since this code is valid under C99 and C++11 (correct?), and it
appears that COFF support for weak symbols is under development, is
this a deficiency that's reportable via the GCC or MinGW bug trackers?


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux