https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81749
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- Strictly speaking, unsigned overflow doesn't even exist. "Integer overflow" is only something that happens for signed integers. Operations on unsigned integers have defined behaviour, they can't "overflow". The C++ standard is clear what happens here: "The negative of an unsigned quantity is computed by subtracting its value from 2^n , where n is the number of bits in the promoted operand. The type of the result is the type of the promoted operand."