[LLVMdev] C99 restrict
Christopher Lamb
christopher.lamb at gmail.com
Mon Mar 26 17:19:32 PDT 2007
> From my understanding the 'restrict' qualifier is a directive to
> the compiler that the pointer or reference should be treated as
> alias free within the scope of the function, regardless. For the
> below code alias(p, q) == No, and alias(p, r) == No, even though q
> is "based-on" p and r may be "based-on" p. This is both the power
> and danger of 'restrict', as it is up to the programmer to use it
> correctly.
My understand here was incorrect. Restrict and non-restrict pointers
may alias each other, so alias(p, q) == May and alias(p, r) == May.
It is only the case that two restrict pointers do not alias each other.
--
Christopher Lamb
christopher.lamb at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070326/17e29b74/attachment.html>
More information about the llvm-dev
mailing list