What    |Removed                     |Added
                 CC|                            |

--- Comment #1 from 2012-11-01 14:27:09 PDT ---
(In reply to comment #0)
> It cannot be named.
> static assert (long.min == -9223372036854775807L);
> // Error: static assert  (-9223372036854775808L == -9223372036854775807L) is
> false
> static assert (long.min == -9223372036854775808L); 
> // Error: signed integer overflow

I don't think this has anything to do with voldermort, and this works just

void main()
    long a = -2L^^63;
    assert(a == long.min);
    long b = long.min;
    assert(b == long.min);

It sounds more like an interpretation error, whereas *writing*
"-9223372036854775808L;" causes an error.

My *guess* is interprets the decimal number into a long, and afterwards, the
sign is applied. This chokes in this particular case, because the valid range
for longs is [-2^^63, 2^^63-1], so the interpreted number overflows before the
compiler has a chance to apply the sign:

long a =  9223372036854775808L; //WRONG
long b = -9223372036854775808L; //LEGAL

But that's just speculation on my part.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to