Re:Compilers Are (Too) Smart
by GeertB on Monday June 10, 2024 @01:03AM
(#40630331)
A smart compiler would have used the test (x & (x - 1)) == 0 to verify that x (assumed non-zero) is a power of two. Don't know why Clang didn't do that here.
[ Parent
| on HN ]