You did not answer the question of SIZE_MAX being the limit. So here it is once again:
> Doesn't it imply that it must be finite, because you can use sizeof() to find its size, which yields something of type size_t, which has maximum size SIZE_MAX?
You could take the exact same C program and run it on a compiler+computer with sizeof(void *) == 64 or 128 or 1000000, and it should handle a correspondingly huge problem.
I am not sure that would be valid. You could also use a defined constant as the limit in the Fortran program. In other words, you could argue that SIZE_MAX is part of the program, the same as the Fortran array size is defined in the program. But I am not sure it would be invalid either... just wondering.
Wouldn't it be possible to, with a really strange number format for integers, define SIZE_MAX as INFINITY? C doesn't require twos-compliment numbers, after all.
> Doesn't it imply that it must be finite, because you can use sizeof() to find its size, which yields something of type size_t, which has maximum size SIZE_MAX?