On Mon, Oct 23, 2017 at 6:24 PM, Pedro Alves <pal...@redhat.com> wrote:
> On 10/23/2017 04:50 PM, David Malcolm wrote:
>
>> FWIW, this one isn't from #pragma poison, it's from:
>>   #define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
>>
>> (I messed up the --in-reply-to when posting the patch, but Gerald noted
>> the issue was due to:
>> /usr/include/c++/v1/typeinfo:199:2: error: no member named
>> 'fancy_abort' in namespace 'std::__1'; did you mean simply
>> 'fancy_abort'?
>>         _VSTD::abort();
>>         ^~~~~~~
>> /usr/include/c++/v1/__config:390:15: note: expanded from macro '_VSTD'
>> #define _VSTD std::_LIBCPP_NAMESPACE
>>               ^
>> /scratch/tmp/gerald/gcc-HEAD/gcc/system.h:725:13: note: 'fancy_abort'
>> declared here
>> extern void fancy_abort (const char *, int, const char *)
>>             ^
>>
>
> IMO the best fix would be to rename that "#define abort" to
> "#define gcc_abort" and then call gcc_abort instead in the few
> places that currently call abort.
>
> IME, the introduction of a new naked call to abort() isn't something
> that easily passes review.  abort calls always stand out and give
> reviewers pause (or they should!).  FWIW, GDB also doesn't want
> such naked abort() calls, I don't recall people-sneaking-in-abort-()-calls
> ever being a problem over there.

It's probably for our build vs. target tools stuff sharing source.  I agree
the best solution is trying to get rid of that define (and instead poision
raw abort).

Richard.

> Thanks,
> Pedro Alves
>

Reply via email to