It is extremely dangerous to dereference outside and allocated range, and it
really should never be done today. As you well know, in C that is undefined.
However over the last few years the C compilers have been getting increasingly
aggressive to implement optimizations that assume that no one would ever do
anything undefined. So even if it happens to work on your test systems today,
it is increasingly unlikely to work over the next few years. At one time you
could call C a high-level assembler, but that is simply no longer the case.
If you want the code to be reliable, and presumably you do, then you really
want to avoid this kind of undefined behavior.
--- David A.Wheeler
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make