[llvm-commits] [llvm] r86572 - /llvm/trunk/docs/LangRef.html

Duncan Sands baldrick at free.fr
Mon Nov 9 10:52:12 PST 2009


Hi Dan,

> +<p>Except when the <tt>inbounds</tt> keyword is present, there is no limitation
> +   on indexing beyond the end of the array implied by the static type (though
> +   any loads or stores must of course be within the bounds of the allocated
> +   object!). This means that single-dimension 'variable sized array' addressing
> +   can be implemented in LLVM with a zero length array type. An implementation
> +   of 'pascal style arrays' in LLVM could use the type
> +   "<tt>{ i32, [0 x float]}</tt>", for example.</p>

does this mean that "inbounds" means that you are not allowed to index off the
end of the *type*, even if you are not indexing off the end of the allocated
object?

Ciao,

Duncan.



More information about the llvm-commits mailing list