Bug 23075 – global const string definitions should go in readonly segment

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-05-01T02:02:30Z
Last change time
2022-05-15T18:43:58Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
Walter Bright

Comments

Comment #0 by bugzilla — 2022-05-01T02:02:30Z
const char s[6] = "hello"; should put `s` into the readonly section, instead it gets placed in the regular mutable data section.
Comment #1 by dlang-bot — 2022-05-01T04:18:35Z
@WalterBright updated dlang/dmd pull request #14046 "fix Issue 23066 - importC: cannot initialize char array with string l…" fixing this issue: - fix Issue 23075 - global const string definitions should go in readonly segment https://github.com/dlang/dmd/pull/14046
Comment #2 by dlang-bot — 2022-05-01T04:25:28Z
@WalterBright created dlang/dmd pull request #14047 "fix Issue 23075 - global const string definitions should go in readon…" fixing this issue: - fix Issue 23075 - global const string definitions should go in readonly segment https://github.com/dlang/dmd/pull/14047
Comment #3 by dlang-bot — 2022-05-06T07:28:43Z
dlang/dmd pull request #14047 "fix Issue 23075 - global const string definitions should go in readon…" was merged into stable: - d4411ad7872a581786fe51ccab44686be88c3e8e by Walter Bright: fix Issue 23075 - global const string definitions should go in readonly segment https://github.com/dlang/dmd/pull/14047
Comment #4 by dlang-bot — 2022-05-15T18:43:58Z
dlang/dmd pull request #14130 "merge stable" was merged into master: - 1e6c84cce5e10aede9e2f44f919d6c2cdef077cb by Walter Bright: fix Issue 23075 - global const string definitions should go in readonly segment https://github.com/dlang/dmd/pull/14130