Bug 22896 – importC: 'function redeclaration with different type' should ignore const

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-03-18T04:58:41Z
Last change time
2022-03-20T06:19:44Z
Keywords
ImportC, pull, rejects-valid
Assigned to
No Owner
Creator
duser

Comments

Comment #0 by duser — 2022-03-18T04:58:41Z
void fn(int); void fn(const int x) { } Error: function `fn` redeclaration with different type gcc and clang allow this without warnings
Comment #1 by dlang-bot — 2022-03-19T23:52:12Z
@WalterBright created dlang/dmd pull request #13845 "fix Issue 22896 - importC: 'function redeclaration with different typ…" fixing this issue: - fix Issue 22896 - importC: 'function redeclaration with different type' should ignore const https://github.com/dlang/dmd/pull/13845
Comment #2 by dlang-bot — 2022-03-20T06:19:44Z
dlang/dmd pull request #13845 "fix Issue 22896 - importC: 'function redeclaration with different typ…" was merged into master: - 030aa6f86d1593407e567fe2529738d2d86a5f0d by Walter Bright: fix Issue 22896 - importC: 'function redeclaration with different type' should ignore const https://github.com/dlang/dmd/pull/13845