3 ms·
Even without redefining those functions, it doesn't seem like too much to ask to have a runtime check and a noisy explosion, at least in debug builds.
by MaxBarraclough 8y ago
Even without redefining those functions, it doesn't seem like too much to ask to have a runtime check and a noisy explosion, at least in debug builds.
- jstimpfle 8y agoThe problem is that array bounds are not available in general. If you use global static arrays compilers can indeed insert checks. In other cases the size might for example be bounded by a terminator sentinel, or have an implicit size based on other runtime variables, etc.
- MaxBarraclough 8y agoIndeed. To rework the whole ecosystem to enable bounds-checking would be quite a task. External native code that allocates, alloca... not easily done. Not as 'tidy' as Java/.Net where arrays are just somewhat special objects.