[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 Aug 8 09:39:56 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1977
Andrei Alexandrescu <andrei at metalanguage.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrei at metalanguage.com
--- Comment #23 from Andrei Alexandrescu <andrei at metalanguage.com> 2009-08-08 09:39:54 PDT ---
(In reply to comment #22)
> (In reply to comment #21)
>
> I'm only worrying about D2 where implicit narrowing conversions is part of the
> spec. ulong%1000 should implicitly allowed when assigning to an integer. Should
> it be a distinct bugzilla entry?
Range value propagation, which was implemented recently, should take care of
this. It's among the simplest examples that should work with range value
propagation. The compiler must infer that a % 1000 has range -999 through 999
and therefore should allow it to fit in a short or int.
--
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