You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
migrate: UCRT assert.h expands to _wassert with wide string literals; native Windows migration of assert() bails #1140
On native Windows, with migrate of a C file that uses assert() fails: UCRT's <assert.h> expands assert(e) to (void)((!!(e)) || (_wassert(_CRT_WIDE(#e), _CRT_WIDE(__FILE__), (unsigned)(__LINE__)), 0)), i.e. a call to _wassert(const wchar_t*, const wchar_t*, unsigned) with WIDE string literals.
migrate: untranslatable function 'check_macros': bailed at kind=111 at input.c:8:71
migrate: untranslatable function 'fail_assert': bailed at kind=111 at input.c:10:25
migrate: unsupported filtered system variable '_wassert' from C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\assert.h:33:27; add an explicit binding or extend std.libc
Two gaps: (1) the migrator has no lowering for wide string literals (L"...", CXCursor StringLiteral with a wide kind); (2) std.libc models the Darwin (__assert_rtn) and glibc (__assert_fail) reporters portably (#1138) but not UCRT's _wassert. Both are needed for a Windows-host migration of any C that asserts.
The fixture test/behavior/behav_migrate_assert_macro.w (new in #1138, PR c-algorithms-phase1) is skip-on: windows until this lands; corpora migrated on macOS/Linux run on Windows already (the reporters are modeled).
Triage 2026-10-25, Windows x86_64 (win10, with.exe from main c88f3ee): does not reproduce. assert from UCRT's <assert.h> migrates and the output checks:
Activity
test: the assert-macro migration fixture skips on Windows (#1140)
stdlib sourcing Phase 1: the c-algorithms corpus, its upstream tests,…
C algorithms phase1 (#1142)
behav_migrate_assert_macro runs on Windows (#1140, #1915)
Windows compiler is self-contained: its own linker and C runtime (no …
ehartford commentedon Oct 25, 2026
Triage 2026-10-25, Windows x86_64 (win10,
with.exefrom main c88f3ee): does not reproduce.assertfrom UCRT's<assert.h>migrates and the output checks: