I do not have the original text C99 (i.e. ISO9899: 1999); I only have a copy of ISO9899: 2007: TC3 . I expect this text, taken from page 111 of this document, to be very similar to the text in the C99 standard.
6.7.3.1 Formal definition of restrict ... 10. EXAMPLE 3 The function parameter declarations void h(int n, int * restrict p, int * restrict q, int * restrict r) { int i; for (i = 0; i < n; i++) p[i] = q[i] + r[i]; } illustrate how an unmodified object can be aliased through two restricted pointers. In particular, if a and b are disjoint arrays, a call of the form h(100, a, b, b) has defined behavior, because array b is not modified within function h.
This, apparently, explicitly calls the form functions that you asked about as defining behavior, provided that pointers with an alias are used for read-only access. Writing through any of the pointers with an alias will cause undefined behavior.
source share