On Fri, 25 Feb 2011 10:58:49 -0500, Andrej Mitrovic
<andrej.mitrov...@gmail.com> wrote:
On 2/25/11, Steven Schveighoffer <schvei...@yahoo.com> wrote:
Fun fact, you can avoid array bounds checks (if you know the index is
valid) by doing arr.ptr[n]
Can't you do the same with -noboundscheck ?
No, -noboundscheck stops bounds checking everywhere. arr.ptr[n] stops
bounds checking for that one statement. It's a lot easier to prove that
one time that bounds checking is not necessary than it is to prove that no
bounds checking is necessary anywhere.
Plus, you can't always control the command line.
-Steve