On Jul 8, 2013 9:15 AM, "Roberto Ierusalimschy" <firstname.lastname@example.org> wrote:
[signed integer overflow]
> > > That may not do what is expected, because it involves
> > > implementation-defined behavior:
> > >
> > > 220.127.116.11 Signed and unsigned integers [...] When an integer is
> > > demoted to a signed integer with smaller size, or an unsigned
> > > integer is converted to its corresponding signed integer, if the
> > > value cannot be represented the result is implementation-defined.
> > If I remember right, you can work around this with a memcpy() from the
> > unsigned variable to the signed variable.
> Before trying to solve a problem, let us be sure there is a
Yes. What problem is wrapping on signed integer overflow trying to solve?