remAddr# implementation does not match documentation
Csaba Hruska notes on ghc-devs
that the documentation of remAddr#
claims:
Return the remainder when the {\tt Addr\#} arg, treated like an {\tt Int\#}, is divided by the {\tt Int\#} arg.}
However, the documentation uses the unsigned mo_wordURem
MachOp
. I believe the documentation here is incorrect: I generally think of pointers as unsigned things and many arithmetic uses (e.g. GHC.Ptr.alignPtr
) would break given a signed remainder for high addresses.