On Fri, Jun 15, 2012 at 8:25 AM, Richard Guenther
<richard.guent...@gmail.com> wrote:
> On Fri, Jun 15, 2012 at 2:40 PM, Duncan Sands <baldr...@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.
>
> Hmm, it looks like it does not need to define that though.  fancy_abort should
> have been prototyped somewhere else while the macros can continue to stay
> in system.h (though I fail to see why we'd have the asserts here).
>
> Of course we have two implementations of it, one in errors.c and one in
> diagnostics.c.

The one in diagnostics.c is what we generally use in almost all front-ends.
 The one in errors.c is used for just the simple-minded "gcc" driver, therefore
it has to be simple.

Maybe the fix is to move that declararation elsewhere?

Reply via email to