This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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: __assert_fail should not be __attribute__((__noreturn__))


On Dienstag, 6. April 2004 22:01, Daniel Jacobowitz wrote:
> On Tue, Apr 06, 2004 at 08:27:05PM +0200, Johannes Sixt wrote:
> > I assume the following:
> >
> > - Developers know that assert() without NDEBUG produces slower code
> > (because the condition must be evaluated).
> > - They use NDEBUG when they compile production code.
> >
> > What is wrong with these assumptions?
>
> Many people never use NDEBUG, and the assertions remain useful.

Appearently its exactly those "many people" that Ulrich named "everybody" 
(because that's those that leave __assert_fail in the code), right?

On Sonntag, 4. April 2004 00:07, Ulrich Drepper wrote:
> we are not going to punish everybody by hurting performance just because
> you want to do something else.

Ulrich, you have been talking about performance, but the only people affected 
are already willingly sacrificing performance.
The performance boost that noreturn gives cannot be so huge that it 
outperforms the condition evaluation. Right or wrong? (Maybe you gcc people 
have some data to back one or the other position?)

-- Hannes


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