4 ms·
GCC prints a similar warning with `-Wall`
by greyfade 15y ago
GCC prints a similar warning with `-Wall`
- thealistra 15y agoactually with -Wextra alistra@bialobrewy ~ % gcc -Wextra 1.c 1.c: In function ‘main’: 1.c:6:8: warning: comparison between signed and unsigned integer expressions alistra@bialobrewy ~ % gcc -Wall 1.c alistra@bialobrewy ~ %
- _delirium 15y agoYes, for some reason in gcc, -Wall enables -Wsign-compare in C++ mode, but not in C mode. Maybe too much existing C code uses those kinds of comparisons?
- thealistra 15y agoThe fact the code uses those kinds of comparisons, doesn't mean, that it uses it properly.