On Fri, 21 Nov 2014 08:10:55 +0000 bearophile via Digitalmars-d <[email protected]> wrote:
> > BTW, granted the 0x7FFFFFFF problems exhibit the bugs less > > often, but paradoxically this can make the bug worse, because > > then it only gets found much, much later in supposedly tested & > > robust code. > > Is this true? Do you have some examples of buggy code? any code which does something like `if (a-b < 0)` is broken. it will work in most cases, but it is broken. you MUST to check values before subtracting. and if you must to do checks anyway, what is the reason of making length signed?
signature.asc
Description: PGP signature
