[Issue 1977] Relax warnings (D1)/errors (D2) for implicit narrowing conversions caused by promotions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 13 09:16:56 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=1977



--- Comment #27 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-10-13 09:16:49 PDT ---
> I don't see. In the example above( http://dpaste.dzfl.pl/8b9f5471 ), the value
in y is 16777216, which is greater than ushort.max.

I thought that I tested that it wasn't, but I guess that I screwed that up,
since upon testing it again, it looks like it indeed is greater than
ushort.max, But what's probably happening then is that x gets promoted to
(u)int for |= per the integral promotion rules and then is fine being
reassigned to x because the result is only 4, which fits in a ushort just fine.

-- 
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