Ah, I read it as one byte beyond the *start* of the current FILE object...
No, it is one byte beyond the ***end*** of the current FILE object.
Unless sizeof(FILE) is 1, these are not the same.
Consider an array of FILE objects and a FILE*.
FILE files[5];
FILE *ptr;
ptrdiff_t diff;
ptr = files;
ptr obviously points to files[0].
ptr++;
Just as obviously, ptr now points to files[1]. Like all arrays, the
five elements of files are consecutive in memory with no overlap and
no gaps.
diff = ptr-files;
Disregarding any type differences, the value in diff is guaranteed to
be equal to sizeof(FILE)
<<Remove the del for email>>