Merging calls to `abort'

Nathan Sidwell nathan@codesourcery.com
Mon Mar 14 14:14:00 GMT 2005


Richard Stallman wrote:
>     Otherwise, we need to consider the merits of disabling an optimization 
>     to make debugging easier.
> 
> Optimizing calls to `abort' doesn't offer much benefit, so I think in
> this particular case it is worth disabling cross-jumping.
> 
>       This is a difficult choice to make, but at 
>     -O2, I'd prefer that we optimize, and suggest other debugging techniques 
>     intead of relying on the line numbers of abort calls.
> 
> The sole purpose of optimization is to satisfy users more.  If the

'abort: core dumped' is not a good user experience.  If code is being
shipped with naked aborts in it, that is where the problem lies.  If
cross jumping makes debugging harder, tough -- debugging is hard,
debugging optimized programs is harder.  Using abort, rather than assert
is not sensible.

I wonder what the size tradeoff is between using non-cross jumped aborts
and using asserts ...

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



More information about the Gcc mailing list