Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nope. There's no warning for bool->int conversion: https://stackoverflow.com/questions/28716391/gcc-forbid-impl...


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: