Issue 24727 - importc: macro conflicts with struct of same name
Summary: importc: macro conflicts with struct of same name
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 All
: P1 blocker
Assignee: No Owner
URL:
Keywords: ImportC
Depends on:
Blocks:
 
Reported: 2024-08-28 08:55 UTC by ryuukk_
Modified: 2024-08-28 08:55 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ryuukk_ 2024-08-28 08:55:16 UTC
```
struct mg_str {

};

void mg_str_s() {

}

#define mg_str(s) mg_str_s(s)
```



The following fail with DMD

```
#defines(119): Error: template `bug.mg_str(__MP21)(__MP21 s)` conflicts with struct `bug.mg_str` at bug.c(1)
```


Perhaps this doesn't cover templates? https://github.com/dlang/dmd/pull/12567