https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64497
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- Looking at the C standard, it seems that the result is implementation-defined on underflow, and zero is a valid result. C++ doesn't change that.