[Issue 4835] DMD should warn about integer overflow in computed constant
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 26 15:13:59 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4835
--- Comment #7 from bearophile_hugs at eml.cc 2013-03-26 15:13:56 PDT ---
(In reply to comment #6)
> uint foo() {
> uint x = 1 << 40;
> return 1 << 90;
> }
>
> gives:
>
> foo2.d(3): Error: shift by 40 is outside the range 0..31
> foo2.d(4): Error: shift by 90 is outside the range 0..31
I was aware of that. I have added the 1<<90 example to show the peculiar error
message given by Go, that contains 1237940039285380274899124224, that is larger
than a ulong.
--
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