Bug 24306 – ImportC: same name structs in separate C files interfere when compiled together

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-12-28T11:48:36Z
Last change time
2023-12-30T05:57:26Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
Dennis
See also
https://issues.dlang.org/show_bug.cgi?id=24303

Comments

Comment #0 by dkorpel — 2023-12-28T11:48:36Z
a.c ``` struct S; ``` b.c ``` struct S {} ``` dmd a.c // works dmd b.c // works dmd a.c b.c // fails with: Error: struct `a.S` unknown size
Comment #1 by dkorpel — 2023-12-28T12:01:04Z
Forgot to copy the semi-colon: ```b.c struct S {}; ``` I'm used to D after all :)
Comment #2 by dlang-bot — 2023-12-30T01:02:53Z
@WalterBright created dlang/dmd pull request #15966 "fix Issue 24306 - ImportC: same name structs in separate C files inte…" fixing this issue: - fix Issue 24306 - ImportC: same name structs in separate C files interfere when compiled together https://github.com/dlang/dmd/pull/15966
Comment #3 by dlang-bot — 2023-12-30T05:57:26Z
dlang/dmd pull request #15966 "fix Issue 24306 - ImportC: same name structs in separate C files inte…" was merged into master: - 3f0e4040c8cc84d22adda0b76cb101e9d6f2102a by Walter Bright: fix Issue 24306 - ImportC: same name structs in separate C files interfere when compiled together https://github.com/dlang/dmd/pull/15966