Re:Demystifying bitwise operations, a gentle C tutorial
by edflsafoiewq on Friday March 03, 2023 @02:08PM
(#35013705)
Nope. There's no warning for bool->int conversion: https://stackoverflow.com/questions/28716391/gcc-forbid-impl...
[ Parent
| on HN ]
Re:Demystifying bitwise operations, a gentle C tutorial
by HarHarVeryFunny on Friday March 03, 2023 @03:29PM
(#35014607)
Somewhat oddly even in C++, where bool is a distinct type, g++ doesn't have any warning for implicit bool to int conversion, although clang's clang-tidy "linter" tool does.