ludovic.cour...@inria.fr (Ludovic Courtès) writes:

> Ian Lance Taylor <i...@google.com> skribis:
>
>> ludovic.cour...@inria.fr (Ludovic Courtès) writes:
>>
>>> However, this means that plug-ins must now be built with g++, except
>>> when GCC was configured with --disable-build-poststage1-with-cxx.  This
>>> seems difficult to deal with, for plug-in writers.
>>
>> This is an unfortunate truth during our transition to building gcc with
>> C++.  There is going to be a period of time when the compiler may be
>> built as either C or C++.  The end goal is for the compiler to always be
>> built with C++, but until we reach that state I think plugin writers
>> will have to test.
>
> What about wrapping the C API in extern "C"?

We eventually will want the internal APIs to be C++, so this transition
will inevitably happen at some point.

I agree that the well-defined plugin API should be extern "C", and
indeed plugin-api.h does use extern "C".  Unfortunately, as we all know,
plugins need to use more than the well-defined API.

Ian

Reply via email to