[Bug libstdc++/41763] valarray_array.h seems to overuse __restrict__

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Oct 20 21:15:00 GMT 2009



------- Comment #6 from jakub at gcc dot gnu dot org  2009-10-20 21:15 -------
Not compared with other arguments to be precise.  It is fine to have
void foo (int *__restrict__ p, int *__restrict__ q)
{
  int *r = p + 10;
  while (p != r)
    *p++ = *q++;
}
Although p is compared here, it is compared with a pointer based on the same
pointer argument.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41763



More information about the Gcc-bugs mailing list