On Tue, Oct 04, 2011 at 02:28:13PM -0400, Jason Merrill wrote:
> This won't affect vectors that are passed by non-restrict reference,
> correct?  We don't want to break code that, say, takes the address

It will ATM also affect global std::vector variables, and std::vector
variables passed by invisible reference.

> of an element and then uses it later unless we've made that invalid
> by marking the vector as restrict.

If you take an address of an element, that would be an expression based
on the restricted field(s).  As such, either PTA would figure out it
is based on it and would use the same restrict tag, or it should figure out
it doesn't know what the pointer points to and shouldn't have a (restr)
on it.

        Jakub

Reply via email to