link statically with libc?

Ketil Z. Malde
07 Aug 2003 14:34:32 +0200

"Simon Marlow" <> writes:

> There isn't a flag to turn off array bounds checking - it would require
> compiling against different libraries.  

I must have misremembered it from somewhere, perhaps confusing it with
-fliberate-case-threshold mentioned a while ago (which probably
belongs in the "experimental" category?)

Turing off bounds checking could be fairly useful, I think, if there
is a significant speedup to be gained.  My impression is that the
typical Ada programmer tests the program thoroughly with bounds
checking, but compiles without for deployment. (Of course, we would
rather *know* a priori that we're not going out of bounds, rather than
just test for it, but it seems to work all right for them)

> There are array operations that
> avoid bounds checking, however (eg. unsafeRead, unsafeWrite).

I suppose I can do it by wrapping array accesses in a class or
otherwise, with a safe and an unsafe implementation, and switch when
I'm satisfied things work.


PS: is large file support in the vicinity yet?
If I haven't seen further, it is by standing in the footprints of giants