------- Comment #5 from pinskia at gcc dot gnu dot org 2009-02-06 01:51 ------- (In reply to comment #4) > Yes because char = char + char is really char = (char)((int)char + (int)char);
Let me expand on that. ((char)CHAR_MAX) + 1 is well defined and there is no overflow that occurs. Since GCC internally assumes signed integer overflow is undefined, it has to convert it to be the well defined unsigned integer version. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39068