[Issue 8478] Turn some undefined pointer comparisons into compile-time errors

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 8 08:37:36 UTC 2022


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

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305 at gmail.com
         Resolution|---                         |WONTFIX

--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
This is system code and system code is allowed to do any kind of weird
operations. Imagine that you have pointers to some stack allocated arrays; in
this case it makes sense to compare pointers since the array elements are
guaranteed to have an order. My opinion is that the type system must allow
liberty when it comes to pointers in system code.

--


More information about the Digitalmars-d-bugs mailing list