On 09/07/2016 11:56 PM, Jason Merrill wrote:
Various places in GCC use negate, bit-and and compare to test whether
an integer is a power of 2, but I think it would be clearer for this
test to be wrapped in a function.

OK for trunk?

I think the canonical way we've written that is

exact_log2 (x) != -1


Though you could argue that's far from obvious.

Presumably you have a follow-up to start using pow2p_hwi?

jeff

Reply via email to