[Issue 17437] Incorrect range check when implicitly converting integer literals to float/double

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 25 18:21:42 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=17437

--- Comment #1 from github-bugzilla at puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/ab9e5e2dc67d33552091185910fe98d12ddb312c
Fix issue 17437 - convertibility of integer literals to float/double

After casting the integer value to the floating-point type, make sure to
backcast it to an integer for the equality check, so that the comparison
is performed as integer instead of the fp type with potentially smaller
integer range. This prevents inexact implicit convertibility.

https://github.com/dlang/dmd/commit/5f25f05f538053b1c9e260db3fe237e2a258ada8
Merge pull request #6831 from kinke/int2fp

Fix Issue 17437 - Incorrect range check when implicitly converting integer
literals to float/double
merged-on-behalf-of: Rainer Schuetze <rainers at users.noreply.github.com>

--


More information about the Digitalmars-d-bugs mailing list