This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Document __builtin_trap

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
> (650) 331-3385 x713

Andrew Pinski

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]