3 ms·
Why doesn't gcc emit warning Wsign-compare for the first example? Why does it emit it only for C++ code?
by yread 17y ago
Why doesn't gcc emit warning Wsign-compare for the first example? Why does it emit it only for C++ code?
- dadkins 17y agoI wondered that too. My best guess is that range of signed/unsigned char both fit in signed ints, so there's no ambiguity in promoting them to ints.