https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61741
--- Comment #2 from Zhendong Su <su at cs dot ucdavis.edu> --- (In reply to Andi Kleen from comment #1) > char c = 0; > for (; a; a--) > for (; c >= 0; c++); > > Don't you rely on signed overflow which is undefined? No, there is no signed overflow since the variable c is a char so the increments are performed on int first and then cast back to char: (char) ((int) c + 1). The same also holds for short.