Bug 15454 – core.checkedint enhancement

Status
NEW
Severity
enhancement
Priority
P4
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-12-16T08:28:48Z
Last change time
2024-12-07T13:36:04Z
Assigned to
No Owner
Creator
Răzvan Ștefănescu
Moved to GitHub: dmd#17319 →

Comments

Comment #0 by rumbu — 2015-12-16T08:28:48Z
Change the overflow type of muls and mulu from bool to the underlying integer type. Since these functions are intended to be treated as intrinsics, the overflow can be easily obtained directly from the x86 mul / arm umull instruction. pure nothrow @nogc @safe uint mulu(uint x, uint y, ref uint overflow); pure nothrow @nogc @safe ulong mulu(ulong x, ulong y, ref ulong overflow); pure nothrow @nogc @safe int muls(int x, int y, ref int overflow); pure nothrow @nogc @safe long muls(long x, long y, ref long overflow);
Comment #1 by robert.schadek — 2024-12-07T13:36:04Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17319 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB