[Nickle] Bug: reference addition bounds check on arrays

Keith Packard keithp at keithp.com
Sat Jan 15 15:17:07 PST 2005

Around 13 o'clock on Jan 15, "Bart Massey" wrote:

> Trying to get the subarray starting at k.  Maybe I can't do that.

You made me get rid of array indexing on pointers...

You can, however, do:

> int[10] a = { [i] = i };
> *int ap = &a[3];
> ap
> *(ap + 1)

If you want re-indexable arrays, there's a bit of work to do.  I don't 
think it's impossible...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : /pipermail/nickle/attachments/20050115/85c63eff/attachment.pgp

More information about the Nickle mailing list