------- Comment #5 from pinskia at gcc dot gnu dot org 2006-09-21 21:24 ------- (In reply to comment #4) > I accepts Andrew's point, but note that you will get errors, not warnings, for > identical C++ code.
Right, this is still invalid code in both C and C++, just in the C front-end we decided to warn by default instead of error out. You can get an error with the C front-end by doing -pednatic-errors > The problem is exacerbate by libc prototypes such as size_t strlen(const char > *s). Because that is what the C (and C++) standard defines the prototypes as. As I mentioned your code is invalid according to the C (and C++) standard so warning is the correct thing to do. I would think you should not care about the signedness of char really. The agrument about UTF-8 is really bogus as you can do: unsigned char a = *b; where b is a pointer to char and get the correct result. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28912