[Issue 17417] Deprecate signed integer promotions in bitwise operations

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue May 23 07:35:27 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17417

--- Comment #3 from uplink.coder at googlemail.com ---
(In reply to anonymous4 from comment #2)
> Promotion in bitwise operators makes better sense for unsigned integers, but
> doesn't make much sense for signed integers, bitwise operators are supposed
> to act on bit arrays, which signed integers are not. After deprecation the
> compiler should give an error for signed integer promotions in bitwise
> operators.

There is precedent for for bitwise operations on singed integers as well, such
as right/left shifts.
To save division cost

--


More information about the Digitalmars-d-bugs mailing list