D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21188 - Anonymous structs - not described
Summary: Anonymous structs - not described
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2020-08-22 12:45 UTC by Victor Porton
Modified: 2022-07-29 08:08 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Victor Porton 2020-08-22 12:45:14 UTC
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 Dlang Bot 2022-07-25 14:12:27 UTC
@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