This is the mail archive of the gcc-patches@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: [Patch 4.6] In system.h, wrap include of C++ header in 'extern C++'


On Fri, Jun 15, 2012 at 7:40 AM, Duncan Sands <baldrick@free.fr> wrote:
> Hi Richard,
>
>
>> As system.h is supposed to only include system headers and do nothing
>> else it has to be prepared to be included from C++ already, so no extern
>> "C"
>> wrapping should be necessary for it.
>
>
> it defines fancy_abort. ?Not wrapping system.h in extern C results in
> ?undefined symbol: _Z11fancy_abortPKciS0_
> when loading the plugin.

If you want fancy_abort to have a C language specification, that is
what you should declare as such.
>
> Ciao, Duncan.


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