https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124

--- Comment #26 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to baoshan from comment #25)
> > Why wrapping is well defined for unsigned types so adding 4294967295 is the
> > same as subtracting by 1.
> 
> What is wrapping? and where it is defined? I don't know this part and I like
> to learn it.
> Thanks.

Just read the C or C++ standards?
E.g. C99, 6.2.5/9:
... "A computation involving unsigned operands can never overflow,
because a result that cannot be represented by the resulting unsigned integer
type is reduced modulo the number that is one greater than the largest value
that can be represented by the resulting type." ...

Reply via email to