Follow-up Comment #1, bug #68812 (group groff): This ticket seems bogus to me. In C, "int" is the type typically used for array indexes, and the C standard explicitly endorses that dominant idiom - for example, C11 "6.5.2.1 Array subscripting" says: "the other expression shall have integer type", which refers to the index. C11 6.5.6.10 gives an explicit example of array subscripting - and naturally uses "int" as type of the index.
Which problem are you trying to solve here?
Both automated static code analysis (which is typically integrated into
compilers, but can also be performed by various external tools) and fuzzing
and address sanitation tools can be used to audit code for bugs, but all such
tools always have a substantial rate of false positives. So changing code
merely because an address sanition tool feels somehow worried is a wrong
approach. Every single instance of a code change following a compiler warning
or a similar warning from another automated tool requires a solid rationale
why the code is actually wrong or dangerous. Merely "The compiler or my ASAN
tool worries and i want to shut it up" is not good enough, and in particular
unfit to suddenly declare a dominant, perfectly healthy idiom as undesirable.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68812>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
