syntax errors for unsigned literals longer than 128 bits #11105
Closed
Description
opened on May 2, 2015
If you have hexadecimal literal, normally it produces an unsigned value, whose size is dependent on the length of the literal.
However, if you go past 128 bits (32 hex digits), then it will switch to a signed number, which could possibly lead to hard to find bugs.
For example:
julia> ~0x00000000000000000000000000000000
0xffffffffffffffffffffffffffffffff
julia> ~0x000000000000000000000000000000000
-1
I believe this at least deserves a warning from the compiler (a point I tried to raise in #11081, only to have the title of my issue changed out from under me and then have it closed)
Activity