SAOC 2026: ImportC Weekly Update #5

Niyati Jain niyati.jainn15 at gmail.com
Thu Oct 22 17:39:57 UTC 2026


This week I started working on Milestone 2: Windows and System 
Header Compatibility.

#21891 merged this week ([PR 
#24043](https://github.com/dlang/dmd/pull/24043)), so that's 
officially closed out from Milestone 1.

Worked on #24058, a basic C redeclaration bug (`extern const int 
*p; const int *p;` incorrectly flagged as a type mismatch). 
Traced it to `cTypeEquivalence()` falling through for plain basic 
types, fixed and got it merged ([PR 
#24068](https://github.com/dlang/dmd/pull/24068)).

The real M2 target is getting sqlite to compile through ImportC 
on Windows, and its actual blocker is `os_win.c`'s syscall table, 
a static struct of function pointers to real Windows API 
functions.
sqlite's real problem: `__declspec(dllimport)` + `__stdcall` + 
taking an address in a static initializer hits an assert in 
`dcast.d` instead of a clean error. Got it down to a 4-line repro 
and double-checked it against a completely clean build of current 
master. Filed as 
[#24089](https://github.com/dlang/dmd/issues/24089).

Worked on one more issue this week, 
[#21266](https://github.com/dlang/dmd/issues/21266), unused 
`inline`/`__forceinline` functions still generating code 
regardless of whether anything calls them, which is exactly the 
kind of thing that blocks real `windows.h` code from linking. The 
fix reaches into general D symbol resolution, not just ImportC, 
so I reverted it and brought it to Nicholas for a second opinion.

Thanks to Nicholas for pointing me at #24058 and for being 
willing to dig through the #24089 and #21266 stuff with me this 
week, it genuinely helped.

Status:
Merged: [#24043](https://github.com/dlang/dmd/pull/24043), 
[#24068](https://github.com/dlang/dmd/pull/24068)
Still blocking sqlite on Windows: 
[#24089](https://github.com/dlang/dmd/issues/24089)
[#21266](https://github.com/dlang/dmd/issues/21266)

Next week: get #24089 sorted, then start the Milestone 2 catalog 
work on zlib and curl against MSVC headers.

Best,
Niyati


More information about the Digitalmars-d mailing list