__assert_fail should not be __attribute__((__noreturn__))

Daniel Jacobowitz drow@false.org
Mon Apr 5 02:46:00 GMT 2004


On Sun, Apr 04, 2004 at 07:30:52PM +0200, Johannes Sixt wrote:
> On Sonntag, 4. April 2004 00:07, Ulrich Drepper wrote:
> > Johannes Sixt wrote:
> > > It would be helpful if
> >
> > Then develop your own debugging scheme.  assert() stays as it is since
> > we are not going to punish everybody by hurting performance just because
> > you want to do something else.
> 
> I do not propose to change assert() (the public interface) nor the 
> implementation in libc. Moreover, I don't see the _performace_ hit if the 
> penalty is in code that by default is never reached. So, I don't see that 
> everybody would be hurt. What's the problem?

You might want to look at what GCC can use the noreturn marker for. 
Branch prediction and block reordering, for instance.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Libc-alpha mailing list