On 2 December 2022 17:06:31 GMT, Edward Catmur via Std-Discussion <email@example.com> 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.
Having said that an unspecified comparison still doesn't restrict the stack layout in any way.
Std-Discussion mailing list