https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124223 --- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> --- Why aren't you just doing arithmetic on the unsigned types? int32_t diff = values[i] - 0x80000000;