Bug 22341 – importC: Error 'fun' called with argument types '(uint)' matches both: 'fun(ulong)' and 'fun(ulong)'

Status
RESOLVED
Resolution
INVALID
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-09-28T16:58:44Z
Last change time
2021-09-28T17:17:20Z
Keywords
ImportC
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2021-09-28T16:58:44Z
typedef long unsigned int size_t; extern int func32(unsigned p); extern int func32_z (size_t p); int func32_z(size_t p) { return 0; } int func32(unsigned p) { return func32_z(p); }
Comment #1 by ibuclaw — 2021-09-28T17:02:48Z
Similarly, this triggers an error too. --- extern void func(const char *str); void func(const char *str) { } void func2() { func("test"); }
Comment #2 by ibuclaw — 2021-09-28T17:03:26Z
Removing `extern` works around the error.
Comment #3 by ibuclaw — 2021-09-28T17:06:10Z
(In reply to Iain Buclaw from comment #2) > Removing `extern` works around the error. Unless you use K&R style, which also triggers the error. --- void func(const char *str); void func(str) const char *str; { } void func2() { func("test"); }
Comment #4 by ibuclaw — 2021-09-28T17:17:20Z
Testing against wrong branch (latest fixes are in stable).