This is the mail archive of the gcc-patches@gcc.gnu.org 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] add gcc_assert


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



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