On 11/1/2014 5:56 PM, "Ola Fosheim Grøstad"
<[email protected]>" wrote:
On Sunday, 2 November 2014 at 00:47:16 UTC, Walter Bright wrote:
On 11/1/2014 4:04 PM, "Ola Fosheim Grøstad"
<[email protected]>" wrote:
Anyway, I believe you can turn on bound checks with some C-compilers if you want
it,
Won't work, because C arrays decay to pointers whenever passed to a function,
so you lose all hope of bounds checking except in the most trivial of cases.
There are bounds-checking extensions to GCC.
Yup, -fbounds-check, and it only works for local arrays. Once the array is
passed to a function, poof! no more bounds checking.
http://www.delorie.com/gnu/docs/gcc/gcc_13.html