Re:Git's list of banned C functions
by kiwidrew on Friday March 05, 2021 @05:14PM
(#26362863)
Yes. In my hypothetical world where the C compiler makes use of the VLA declaration in the function arguments, it would certainly be possible for the compiler to insert automatic bounds checking in this case:
The key to making this possible is telling the compiler about the relationship between double* xs and size_t n; once the compiler has the knowledge that the type of xs is double [n] (array of double with first dimension n) it would be able to automatically insert dynamic bounds checks.
[ Parent
| on HN ]
There are no comments on this comment yet.