On 5/23/20 7:36 AM, Marc Nieper-Wißkirchen wrote:
> The verify  also contains a runtime check `assume', which uses
> __builtin_unreachable if available to help the compiler in optimizing
> modes.

I wouldn't call 'assume (X)' a "runtime check". It's more an anti-runtime-check.

'assume (X)' is a directive from the programmer to the compiler that X is true
so that the compiler needn't generate code to test whether X is true. This is
why 'assume' is in verify.h: it's related to static checking (in this case,
static checking done by the programmer), not dynamic checking.

Perhaps I should add a comment to this effect....

Reply via email to