Bug 21188 – Anonymous structs - not described

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-08-22T12:45:14Z
Last change time
2022-07-29T08:08:36Z
Keywords
pull
Assigned to
No Owner
Creator
Victor Porton

Comments

Comment #0 by porton — 2020-08-22T12:45:14Z
https://dlang.org/spec/struct.html defines AnonStructDeclaration: struct AggregateBody but in this page, it's said nothing about the semantics of anonymous structs. That's a bug in the specification.
Comment #1 by dlang-bot — 2022-07-25T14:12:27Z
@ntrel created dlang/dlang.org pull request #3355 "[spec/struct] Add 'Union Literals' & 'Anonymous Structs & Unions'" fixing this issue: - [spec/struct] Add 'Union Literals' & 'Anonymous Structs & Unions' Fix Issue 21188 - Anonymous structs - not described. Fix Issue 18855 - Behavior of Anonymous Union is Undocumented. Fix: Non-overlapping union field data is not default initialized, it is zeroed. https://github.com/dlang/dlang.org/pull/3355