[Issue 21675] Unsafe aggregate field initializer causes undefined behavior in @safe code

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 30 15:48:57 UTC 2024


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

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
@ntrel created dlang/dmd pull request #16347 "Require @system for field
initializers with mutable reference types" fixing this issue:

- Require @system for field initializers with mutable reference types

  Enabled with -preview=unsafeFieldInit.

  Fixes Bugzilla 21675 - Unsafe aggregate field initializer causes undefined
behavior in @safe code

https://github.com/dlang/dmd/pull/16347

--


More information about the Digitalmars-d-bugs mailing list