On 5/4/05, James E Wilson wrote: [..] > The standard says "A translator is free to ignore any or all aliasing > implications of restrict". So there is no conflict with the standard > here. We are free to do as little optimization as we want, and in the > case of a restricted char pointer, we do none.
I'm aware of that. The reason are asked for more clarity is that I think gcc should do better (as in the example I gave), but I want to be sure that this is still allowed by the standard. [..] > /* No two restricted pointers can point at the same thing. > However, a restricted pointer can point at the same thing > as an unrestricted pointer, if that unrestricted pointer > is based on the restricted pointer. So, we make the > alias set for the restricted pointer a subset of the > alias set for the type pointed to by the type of the > decl. */ [..] >From what I found on these pages I refered to, this could be made more strict : accesses through restricted pointers would not interfere with other accesses, which would allow some more aggressive optimizations. Greetings, -- Jeroen Dobbelaere