[dmd v2.066.0-b2] Some functions no longer accept ulong
I'm currently testing my code, which uses unstd, with the v2.066.0-b2 version of dmd/druntime/phobos and I'm now getting errors of the form
src/unstd/memory/allocation.d(630): Error: None of the overloads of 'alignUp' are callable using argument types (const(ulong), ulong), candidates are: src/unstd/math.d(140): unstd.math.alignUp(const(uint) alignment, const(uint) n)
when compiling unstd (everything was working fine with a DMD stack from 2014-05-16). My guess is some change in DMD and friends now disallows some implicit casts? Similar errors are obscured; I tried changing the parameter types to size_t and I needed to change a bunch of functions to make everything compile, but I'm not sure this doesn't break anything else...
Comments (5)
-
repo owner -
repo owner -
assigned issue to
-
assigned issue to
-
repo owner - changed status to resolved
[Fix] Use
size_t
instead ofuint
as parameter type inunstd.math
functions.unstd.math
functions acceptuint
parameters but are often called forsize_t
and thus will fail ifsize_t
isulong
.Fixes bug
#1.→ <<cset 55cbe4eebb67>>
-
repo owner Thanks for the report. Now all unittests compiles with
-m64
switch. -
reporter Thank you for the fast fix!
- Log in to comment
Sorry for that, it's an old known issue.
unstd.math
functions acceptuint
but often called forsize_t
and will fail ifsize_t
isulong
(unless there is a compiler bug somewhere). I just failed to create a good design when I created that module.Thanks for the report, it will be fixed in 24 hours.