[Issue 4491] Assigning large const value to ulong type results in "signed integer overflow"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 21 14:32:11 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4491
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
CC| |clugdbug at yahoo.com.au
--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-07-21 14:32:06 PDT ---
You need to add an 'L' suffix when it's larger than int.max, and a 'U' suffix
when it's unsigned.
import std.stdio;
void main()
{
ulong t = 18446744073709551615UL;
printf("%llu\n", t);
}
The error message should make this clearer. Marking as a 'diagnostic' bug.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list