lkml.org 
[lkml]   [2003]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: BUGed to death
Date
> > No, I meant what happens if BUG() is non-trivial and BUG_ON is a no-op.
> > I thought it might give an indication of whether time was being lost
> > evaluating the condition (occurs with BUG and BUG_ON), or mispredicting
> > the branch (only occurs with BUG).
>
> Mmmm. wouldn't that just optimise away the BUG_ONs, but not the BUGs ?
> Which will tell you something, but I'm not sure anything interesting.
> My impression is that if I do:
>
> if (foo)
> do {} while (0);
>
> the compiler will just ditch the whole thing, and not evaluate foo.
> I'll admit to not having checked that, but still ....

Good point. So much for trying to get info without converting a bunch
of BUG's into BUG_ON's...

Duncan.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.033 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site