<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Aug 21, 2015 at 12:14 PM, Michael Zolotukhin via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">mzolotukhin added a comment.<br>
<br>
Oh, I see. So, you meant something like this?<br>
<br>
  void foo(std::vector<float * __attribute__((nontemporal))> av, float * b, int N) {<br>
    for (auto a: av)      // << `a` doesn't have nontemporal attribute here<br>
      for (int i = 0; i < N; i++)<br>
        a[i] = b[i]+1;<br>
  }<br>
<br>
One can easily work around it by using an explicit type here (`float * __attribute__((nontemporal))` instead of `auto`), but I agree that disappeared attribute might be a surprise for the user. Do you think it would be a frequent case?<br>
<br>
BTW, there are other type attributes, which also suffer from the same issue, e.g. `vector_size`. What was the rationale of making them type attributes?</blockquote><div><br></div><div>vector_size produces a completely different type, with a different size, alignment, different semantics and constraints for primitive operations, and so on.<br></div></div></div></div>