On Tue, Oct 26, 2021 at 11:17 PM Derrick Stolee <stolee@xxxxxxxxx> wrote: (regarding a pointer that "backs up one before the beginning of the array" as it were) > I also see the specification saying this is undefined, but I do not > understand how any reasonable compiler/runtime could do anything > other than store "path - 1" as if it was an unsigned integer. ... This Standard C rule dates back to old segmented systems. If you put some array A into its own segment, and use only the offset as the "pointer", and the segment offset starts at zero, then A[0] is at "address zero". So the imaginary element at A[-1] is at "address max", and a loop like: for (p = &A[N]; p >= &A[0]; p--) is an infinite loop. In practice nobody is using these architectures today, but the restriction still exists. Chris