Skip to content

Fix Int128-and-float conversion overflow checks on Windows LLVM 14+#13222

Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:bug/windows-int128-float-overflow
Mar 25, 2023
Merged

Fix Int128-and-float conversion overflow checks on Windows LLVM 14+#13222
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:bug/windows-int128-float-overflow

Conversation

@HertzDevil
Copy link
Contributor

@HertzDevil HertzDevil commented Mar 24, 2023

Follow-up to #13218. The generic T::MIN <= self <= T::MAX checks introduced in that PR don't work because those mixed comparison primitives always convert both arguments to the used float type first.

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:windows Windows support based on the MSVC toolchain / Win32 API topic:stdlib:numeric kind:regression Something that used to correctly work but no longer works labels Mar 24, 2023
@straight-shoota straight-shoota added this to the 1.8.0 milestone Mar 24, 2023
@HertzDevil HertzDevil removed the kind:regression Something that used to correctly work but no longer works label Mar 24, 2023
@straight-shoota straight-shoota merged commit 5aac124 into crystal-lang:master Mar 25, 2023
@HertzDevil HertzDevil deleted the bug/windows-int128-float-overflow branch March 27, 2023 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:windows Windows support based on the MSVC toolchain / Win32 API topic:stdlib:numeric

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants