https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26367
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2017-02-16 CC| |msebor at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #8 from Martin Sebor <msebor at gcc dot gnu.org> --- As noted in comment #7 the three levels are provided by a combination of __builtin_expect and __builtin_unreachable, for example like so: void f_n (void); void f_p (void); void f_0 (void); void f (int i) { if (__builtin_expect (i < 0, 0)) __builtin_unreachable (); // certain if (__builtin_expect (i == 0, 0)) f_0 (); // weak if (__builtin_expect (i > 0, 1)) f_p (); // strong } Is there anything else that's not covered by these two built-ins or can this bug be resolved?