[Issue 259] Comparing signed to unsigned does not generate an error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 27 09:44:04 UTC 2021


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

Manuel König <manuelk89 at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manuelk89 at gmx.net

--- Comment #69 from Manuel König <manuelk89 at gmx.net> ---
I hit this 15 years old bug again, and now feel very insecure about the
correctness of all integer comparisons in all my code. At least a warning about
signed-unsigned comparison would be great, doing the mathematically correct
fast & safe integer promotions would be even better. Not sure how to deal with
the slower comparisons like long-unsigned that have no direct assembly
comparison instruction, maybe just produce an error message.

--


More information about the Digitalmars-d-bugs mailing list