'int' is enough for 'length' to migrate code from x86 to x64
ketmar via Digitalmars-d
digitalmars-d at puremagic.com
Fri Nov 21 07:13:12 PST 2014
On Fri, 21 Nov 2014 14:55:45 +0000
FrankLike via Digitalmars-d <digitalmars-d at puremagic.com> wrote:
> On Friday, 21 November 2014 at 13:59:08 UTC, ketmar via
> Digitalmars-d wrote:
>
> > any code which does something like `if (a-b < 0)` is broken. it
>
> Modify it:
> https://github.com/D-Programming-Language/druntime/blob/master/src/core/checkedint.d
>
> Modify method: subu(uint ...) or subu(ulong ...)
> if(x<y)
> return y -x ;
> else
> return x -y;
>
> It will be not broken.
and it will not do the same anymore too. it's not a fix at all.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141121/18732ba6/attachment.sig>
More information about the Digitalmars-d
mailing list