Bug 23029 – ImportC: _Generic treats pointer to const and regular pointers as the same type

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-04-17T07:11:09Z
Last change time
2022-04-19T13:59:16Z
Keywords
ImportC, pull, rejects-valid
Assigned to
No Owner
Creator
dave287091

Comments

Comment #0 by dave287091 — 2022-04-17T07:11:09Z
void print_const(const char*); void print(char*); int main(){ (void)_Generic("", // Error: generic association type `char*` can only appear once char*: print, const char*: print_const )("hello"); }
Comment #1 by dlang-bot — 2022-04-19T07:21:47Z
@WalterBright created dlang/dmd pull request #14014 "fix Issue 23029 - ImportC: _Generic treats pointer to const and regul…" fixing this issue: - fix Issue 23029 - ImportC: _Generic treats pointer to const and regular pointers as the same type https://github.com/dlang/dmd/pull/14014
Comment #2 by dlang-bot — 2022-04-19T13:59:16Z
dlang/dmd pull request #14014 "fix Issue 23029 - ImportC: _Generic treats pointer to const and regul…" was merged into master: - 2debd946c8d5c24e47436f657d49bb3257daf1fc by Walter Bright: fix Issue 23029 - ImportC: _Generic treats pointer to const and regular pointers as the same type https://github.com/dlang/dmd/pull/14014