This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] add gcc_assert
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Mark Mitchell <mark at codesourcery dot com>
- Date: Fri, 27 Aug 2004 23:14:53 +0100
- Subject: Re: [PATCH] add gcc_assert
- Organization: Codesourcery LLC
- References: <412F1701.7050805@codesourcery.com> <20040827200406.GA12897@redhat.com>
Richard Henderson wrote:
Another possibility for release branches is to use __builtin_trap.
That will continue to halt the program if something goes wrong,
but reduce the size of the gcc image (since we're not having to
store all the __FILE__, __LINE__, __FUNCTION__ data).
I was going to experiment with allowing fancy_abort to have no
parameters, and see what size difference that made.
It also may be compiled to conditional-trap instructions, which
may be a bit more efficient for the target.
good idea.
You never need to use __builtin_expect. GCC always assumes that
calls to noreturn functions are not taken.
excellent!
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk