3 ms·
I've just tested against GCC master and can confirm that -Wint-in-bool-context does not trigger on this very, very standard case. Per the examples in the docum
by ajdlinux 9y ago
I've just tested against GCC master and can confirm that -Wint-in-bool-context does not trigger on this very, very standard case.
Per the examples in the documentation, it does trigger when you do something silly like "if (i < 3 ? 7 : 0)".
In fact if you read the documentation and the warning messages more closely, it's looking for suspicious use of integer constants, not integer variables.
- ChuckMcM 9y agoAwesome, and I missed the bit about constants.