[PATCH] Document __builtin_trap
Andrew Pinski
pinskia@gmail.com
Sun Nov 12 23:54:00 GMT 2006
On Sun, 2006-11-12 at 16:04 -0700, Roger Sayle wrote:
> On Sun, 12 Nov 2006, Andrew Pinski wrote:
> >
> > * doc/extend.texi (__builtin_trap): Document.
>
> Ok everywhere. Thanks for catching this.
Mark replied privately (I am assuming that was on accident because the
nature of the email) and I was going to apply his version tomorrow.
Here was his email:
> This is a bit circular: __builtin_trap uses the trap instruction.
> (This
> function really probably should have been called __builtin_abort,
> except
> that it doesn't result in SIGABRT being sent to the process.)
>
> In any case, I think better documentation would be:
>
> "This function causes the program to exit abnormally. GCC implements
> this function by using a target-dependent mechanism (such as
> intentionally execution of an illegal instruction) or by calling
> @code{abort}. The mechanism used may vary from release to release so
> you should not rely on any particular implementation."
>
> OK with that version.
>
> --
> Mark Mitchell
> CodeSourcery
> mark@codesourcery.com
> (650) 331-3385 x713
Thanks,
Andrew Pinski
More information about the Gcc-patches
mailing list