Hacker News new | ask | show | jobs
by tester34 2145 days ago
I think code like this shouldn't even compile like in other languages

>Operator '&&' cannot be applied to operands of type 'bool' and 'int'

2 comments

That would require some pretty big changes in the C programming language. Static analysis should detect it though, and probably does.
_Bool is a relatively new addition to C, those operators return int results that are either zero or not.