Stream: t-lang/wg-unsafe-code-guidelines

Topic: Layout stability?

RalfJ (Jun 23 2019 at 11:02, on Zulip):

AFAIK we don't say anything about layout stability yet in our "book"? I can't even find a section on the topic where we say that pretty much everything is open. And maybe we can at least say that running the same binary multiple times will always use the same layout?
Also see

rkruppe (Jun 23 2019 at 11:07, on Zulip):

For structs we have (

A note on determinism. The definition above does not guarantee determinism between executions of the compiler -- two executions may select different layouts, even if all inputs are identical. Naturally, in practice, the compiler aims to produce deterministic output for a given set of inputs. However, it is difficult to produce a comprehensive summary of the various factors that may affect the layout of structs, and so for the time being we have opted for a conservative definition.

RalfJ (Jun 23 2019 at 11:09, on Zulip):

hm I see. that doesn't really have anything to do with structs though? It should be in a dedicated section IMO.

RalfJ (Jun 23 2019 at 12:15, on Zulip):

issue created at

Jake Goulding (Jun 23 2019 at 15:09, on Zulip):

A lot of this exists in nascent form at

gnzlbg (Jun 24 2019 at 12:55, on Zulip):

What do you have in mind ?

Last update: Nov 19 2019 at 18:55UTC