[Issue 12514] New: Value range analysis in triple operator too
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Apr 3 10:41:08 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12514
Summary: Value range analysis in triple operator too
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2014-04-03 10:41:04 PDT ---
Value range analysis could be extended to cover this case too:
void main() {
ulong x = 10_000_000;
uint y = (x <= uint.max) ? x : 0;
}
dmd 2.066alpha gives:
test.d(3,14): Error: cannot implicitly convert expression (x <= 4294967295LU ?
x : 0LU) of type ulong to uint
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list