Bug 19524 – Make core.checkedint work in betterC

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-12-30T14:31:04Z
Last change time
2018-12-30T19:34:37Z
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2018-12-30T14:31:04Z
This can be done by converting all functions to zero-argument templates. The risk would be that this changes the function mangling and may cause mulu etc. to cease being intrinsic functions if a compiler had been handling them specially. A cursory check didn't reveal any affected intrinsics in DMD.
Comment #1 by n8sh.secondary — 2018-12-30T14:36:23Z
Comment #2 by github-bugzilla — 2018-12-30T19:34:36Z
Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/415d7d3763026c1f3da6b8fce68f3eee2d04d883 Fix Issue 19524 - Make core.checkedint work in betterC Do this by making everything in checkedint a zero-argument template function. The risk is that this changes the function mangling and may cause `mulu` etc. to cease being intrinsic functions if a compiler had been handling them specially, although DMD does not appear to have been doing this. https://github.com/dlang/druntime/commit/25a55b901d6b7c1553fcaf6ce104b88f9bd89b93 Merge pull request #2426 from n8sh/issue-19524 Fix Issue 19524 - Make core.checkedint work in betterC merged-on-behalf-of: Nathan Sashihara <[email protected]>