On Fri, 2 Dec 2022, 17:51 Lénárd Szolnoki via Std-Discussion, <std-discussion@lists.isocpp.org> wrote:

On 2 December 2022 17:06:31 GMT, Edward Catmur via Std-Discussion <std-discussion@lists.isocpp.org> wrote:
>> Another could be freedom for compilers how they will layout stack
>> > variables as you are not allowed to compare addresses of them.
>I don't think undefined vs. unspecified makes much of a difference here;
>the compiler could just always return false to every comparison between
>pointers to automatic variables and you wouldn't be able to learn anything
>about the layout.

I don't think this is feasibly implementable. Consider `identity(&a) < identity(&b)`, where `identity` is opaque to the compiler.

Or just using intptr_t. But the compiler doesn't have to give consistent answers to any of these. 

Having said that an unspecified comparison still doesn't restrict the stack layout in any way.

Right, yeah.