A strange div bug on Linux x86_64, (both dmd & ldc2): long -5000 / size_t 2 = 9223372036854773308
jmh530
john.michael.hall at gmail.com
Thu Aug 13 19:03:33 UTC 2020
On Thursday, 13 August 2020 at 18:51:09 UTC, mw wrote:
> [snip]
>
> It is an int. See the Java Language Specification, section 10.7.
>
>
> Initially, Java don't have unsigned integer type; it's added as
> late as Java 8, and when it's added, they also added the extra
> methods to properly handle them:
>
> https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
> [snip]
In other words, it was not added until 2014, and even then done
in a backwards compatible way that doesn't let you actually
declare unsigned ints, just to call some methods on them assuming
they are unsigned.
More information about the Digitalmars-d
mailing list