D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 23348 - not handling braceless sub structs in initializers
Summary: not handling braceless sub structs in initializers
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-19 08:22 UTC by Walter Bright
Modified: 2022-09-20 07:19 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Walter Bright 2022-09-19 08:22:26 UTC
struct SS {
    char a, b[2];
};

struct S {
    struct SS ss;
    char d;
};

static struct S s = { 1, 2, 3, 4 };

should result in data of 1,2,3,4 but produces 1,2,2,3
Comment 1 Dlang Bot 2022-09-20 07:19:56 UTC
dlang/dmd pull request #14455 "fix Issue 23348 - not handling braceless sub structs in initializers" was merged into master:

- 404a4af2486779dec0dec77a4a72c9097fe1068a by Walter Bright:
  fix Issue 23348 - not handling braceless sub structs in initializers

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