Re: ASSERT and __builtin_unreachable

2019-09-03 Thread Niels Möller
"Marco Bodrato" writes: > I'd not agree. I mean: I like the idea of hinting to the compiler, but I'd > use a different macro. Something like ASSERT_OR_HINT, or simply HINT. Right, a separate macro seems safer. > But we also have ASSERTs that calls functions! > e.g. in mpn/generic/hgcd_reduce.c

Re: ASSERT and __builtin_unreachable

2019-09-03 Thread Marco Bodrato
Ciao, Il Mar, 3 Settembre 2019 8:06 am, Niels Möller ha scritto: > I think we discussed this earlier, but I don't recall the conclusion, if I do not remember if we actually discussed, but surely we talked about... > any. Would it make sense to use ASSERT to guide the compiler, and define > it

Re: ASSERT and __builtin_unreachable

2019-09-03 Thread Marc Glisse
On Tue, 3 Sep 2019, Niels Möller wrote: I think we discussed this earlier, but I don't recall the conclusion, if any. Would it make sense to use ASSERT to guide the compiler, and define it like #define ASSERT(expr) do { if (!(expr)) __builtin_unreachable(); } while (0) (unless building with