Bug 22623 – ImportC: typedef'd struct definition tag not put in symbol table

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-12-22T22:52:24Z
Last change time
2022-01-23T22:44:50Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
duser

Comments

Comment #0 by duser — 2021-12-22T22:52:24Z
--- struct first_s { struct second_s *child; }; typedef struct second_s { int xyz; } second_t; void fn() { struct first_s v1; struct second_s v2; if (v1.child != &v2) // error ; } --- output: --- test.c(13): Error: incompatible types for `(v1.child) !is (& v2)`: `test.first_s.second_s*` and `test.second_s*` --- the error goes away if the typedef around the second struct is removed seen with DMD64 D Compiler v2.098.0-361-g415e58e6d (current git master)
Comment #1 by dlang-bot — 2022-01-23T09:16:31Z
@WalterBright created dlang/dmd pull request #13565 "fix Issue 22623 - ImportC: typedef'd struct definition tag not put in…" fixing this issue: - fix Issue 22623 - ImportC: typedef'd struct definition tag not put in symbol table https://github.com/dlang/dmd/pull/13565
Comment #2 by dlang-bot — 2022-01-23T22:44:50Z
dlang/dmd pull request #13565 "fix Issue 22623 - ImportC: typedef'd struct definition tag not put in…" was merged into master: - caaf6b093a55c0fe4110922699f20b1339d91013 by Walter Bright: fix Issue 22623 - ImportC: typedef'd struct definition tag not put in symbol table https://github.com/dlang/dmd/pull/13565