[PATCH] add gcc_assert

Nathan Sidwell nathan@codesourcery.com
Fri Aug 27 23:03:00 GMT 2004


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




More information about the Gcc-patches mailing list