[LLVMdev] C99 restrict

Christopher Lamb christopher.lamb at gmail.com
Mon Mar 26 16:54:10 PDT 2007



On Mar 26, 2007, at 5:53 PM, Neil Booth wrote:

> Christopher Lamb wrote:-
>
>> It may even be incorrect for the compiler to enforce the semantics of
>> restrict pointers (with an error), even when the compilers alias
>> analysis determines that there is a may-alias relationship between to
>> pointers.
>
> An error is an example of undefined behaviour.

The point I was trying to make is that the 'restrict' qualifier  
stipulates the result of an alias query between to such qualified  
pointers. So even if the alias analysis returns that these two  
pointers may alias, it would not be correct to flag an error. This  
link has an example which may be useful http://www.lysator.liu.se/c/ 
restrict.html#overlapping-objects.

--
Christopher Lamb
christopher.lamb at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070326/1e47f46f/attachment.html>


More information about the llvm-dev mailing list