On Wed, Sep 28, 2016 at 4:01 PM, <b...@ccrma.stanford.edu> wrote:

> (int)-1 % (unsigned int)10    => 5
>>
>
> That's very interesting -- I never noticed this!
> Thanks very much for the bugfix -- I'll merge it into
> my sources today -- then I need to look at all
> the other % cases.
>
>
Yes, very good catch. Regarding unsigned integers, there have
been so many bugs caused by unsigned integers that I have
stopped using them completely in my software.
(The common bug is of course "(unsigned int)-1 < 0", and
variants of it, which is always false.)

I think Qt practices the same philosophy; no unsigned integers.
_______________________________________________
Cmdist mailing list
Cmdist@ccrma.stanford.edu
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to