Update of bug #68812 (group groff):
Status: Confirmed => Need Info
_______________________________________________________
Follow-up Comment #7:
> the problem is not that using the data type "int" for array indices is wrong
> in any way
Of course it is. `int` is always signed, and negative indexing from the
_start_ of an array object is always UB, as I understand it.
Yes, one can contrive an array whose base lies in the midst of an another
array, aliasing its storage, and where negative indices would then be
meaningful.
Setting Status to "Need Info" as this topic is evidently a can of worms for
various conflicting views of what data types are good for, and whether ISO
C2y's contemplated forthcoming destruction of array subscripting and pointer
arithmetic equivalence digs up Dennis Ritchie's grave and desecrates his body.
See [https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3360.htm N3360],
[https://www.open-std.org/Jtc1/sc22/wg14/www/docs/n3583.htm N3583], and
[https://www.open-std.org/JTC1/sc22/wg14/www/docs/n3517.htm N3517].
I guess array subscripting will become less magical and more múgical.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68812>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
