On 11/16/20 2:04 AM, Richard Biener via Gcc-patches wrote: > On Sun, Nov 15, 2020 at 1:46 AM Martin Sebor via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: >> GCC considers PTRDIFF_MAX - 1 to be the size of the largest object >> so that the difference between a pointer to the byte just past its >> end and the first one is no more than PTRDIFF_MAX. This is too >> liberal in LP64 on most systems because the size of the address >> space is constrained to much less than that, both by the width >> of the address bus for physical memory and by the practical >> limitations of disk sizes for swap files. > Shouldn't this be a target hook like MAX_OFILE_ALIGNMENT then?
I think one could argue either way. Yes, the absolutes are a function of the underlying hardware and it can change over the lifetime of a processor family which likey differs from MAX_OFILE_ALIGNMENT. A PARAM gives the developer a way to specify the limit which is more flexible. What I'm not really not sure of is whether is really matters in practice for end users. jeff