Bug 22265 – importC: Error: cannot modify 'const' expression

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-09-01T12:07:10Z
Last change time
2021-10-10T23:13:23Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2021-09-01T12:07:10Z
It looks like 'const char*' is being translated to 'const(char*)' instead of 'const(char)*'. Reduced test: --- void test(const char *buf) { int a = *buf++; }
Comment #1 by dlang-bot — 2021-09-04T03:31:05Z
@ibuclaw created dlang/dmd pull request #13041 "fix Issue 22265 - importC: Error: cannot modify 'const' expression" fixing this issue: - fix Issue 22265 - importC: Error: cannot modify 'const' expression https://github.com/dlang/dmd/pull/13041
Comment #2 by dlang-bot — 2021-10-10T04:40:28Z
@WalterBright created dlang/dmd pull request #13145 "fix Issue 22265 - importC: Error: cannot modify 'const' expression" fixing this issue: - fix Issue 22265 - importC: Error: cannot modify 'const' expression https://github.com/dlang/dmd/pull/13145
Comment #3 by dlang-bot — 2021-10-10T06:03:38Z
dlang/dmd pull request #13145 "fix Issue 22265 - importC: Error: cannot modify 'const' expression" was merged into stable: - 1d4932a330a239905170e3bd4cbd6cb2a0ffe26a by Walter Bright: fix Issue 22265 - importC: Error: cannot modify 'const' expression https://github.com/dlang/dmd/pull/13145
Comment #4 by dlang-bot — 2021-10-10T23:13:23Z
dlang/dmd pull request #13149 "merge stable" was merged into master: - bfbd2c27d332a0f0ea16cd797a6259282a89f682 by Walter Bright: fix Issue 22265 - importC: Error: cannot modify 'const' expression https://github.com/dlang/dmd/pull/13149