https://issues.dlang.org/show_bug.cgi?id=22757
Issue ID: 22757 Summary: importC:Error: forward reference to (*pRowSet).pChunk Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: ImportC, rejects-valid Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: dave287...@gmail.com The following reduced C code from sqlite fails to compile: typedef struct RowSet RowSet; struct RowSetChunk { struct RowSetChunk *pNextChunk; }; struct RowSet { struct RowSetChunk *pChunk; }; void foo(struct RowSet *pRowSet){ struct RowSetChunk **ppPrevTree = &pRowSet->pChunk; // Error: forward reference to `(*pRowSet).pChunk` } Oddly, if you remove the typedef it compiles without error, even though the typedef is not used at all. If you move the typedef, it also compiles without error. --