https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63806
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- ? That is the correct thing to do, there is no undefined behavior in C/C++ in that testcase, for any a/b values. a + b in C is computed on promoted arguments, so (signed char) ((int) a + (int) b) in this case, so as long as signed char is narrower than int, it is fine.