Please consider the following piece of code:
void error_handling(); bool method_impl(); bool method() { const bool res = method_impl(); if (res == f
You could suggest the compiler that the method_impl() will return true:
method_impl()
void error_handling(); bool method_impl(); bool method() { const bool res = method_impl(); if (__builtin_expect (res, 0) == false) { error_handling(); return false; } return true; }
This will work in GCC.