On Fri, Jun 15, 2012 at 3:31 PM, Ian Lance Taylor <i...@google.com> wrote: > Gabriel Dos Reis <g...@integrable-solutions.net> writes: > >> On Fri, Jun 15, 2012 at 2:17 PM, Ian Lance Taylor <i...@google.com> wrote: >>> Gabriel Dos Reis <g...@integrable-solutions.net> writes: >>> >>>> What we can do is what I suggested >>>> in my last message: just give the language specification to the >>>> declarations >>>> that matter in gcc/system.h. >>> >>> Sure, just have to check #ifdef ENABLE_BUILD_WITH_CXX to know what >>> specification to give. >> >> Hmm... could you elaborate on checking for ENABLE_BUILD_WITH_CXX as >> opposed to just checkin __cpluscplus ? > > If ENABLE_BUILD_WITH_CXX is defined, then GCC itself is built with C++, > and we want a C++ signature for functions. If it is not defined, then > GCC itself is not built with C++, and we want (and must have) a C > signature. > > I suppose we would decide that fancy_abort always uses a C signature, > but that seems odd. > > Ian
I guess the issue is when people care only about C plugins, yet fancy_abort get implicitly exported with a C++ linkage. I suspect this goes back to the eternal question: what do we consider as part of the public GCC public API (no, Basile, I am not suggesting to have the same discussion again.) -- Gaby