[Issue 23175] -preview=in silently adds possible stack memory escape

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 10 17:52:14 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=23175

--- Comment #4 from Paul Backus <snarwin+bugzilla at gmail.com> ---
My summary the historical information above:

* Except for a few months in 2018, `in` has consistently been documented as
`const scope` since 2013.

* Until `-preview=in`, the compiler has consistently treated `in` as `const`.

* There has been considerable confusion over whether the spec or the compiler's
behavior should be treated as authoritative w.r.t. the meaning of `in`.

In light of this information, I am inclined to agree with Jonathan M Davis's
comment from issue 17928:

> If we want in to mean scope const instead of just const, then we're going
> to need a means of migrating to that without immediately breaking code

--


More information about the Digitalmars-d-bugs mailing list