This happens when trying to compile errno.c in druntime:
https://github.com/dlang/druntime/pull/3856
---
D:/a/1/dmd/generated/windows/release/64/dmd -c -of=errno_c_64.obj -m64 -conf= -O -release -preview=dip1000 -preview=fieldwise -preview=dtorfields -inline -w -Isrc -Iimport -v -P=-I. src\core\stdc\errno.c
predefs DigitalMars LittleEndian D_Version2 all D_SIMD Windows Win64 CRuntime_Microsoft CppRuntime_Microsoft D_InlineAsm_X86_64 X86_64 D_LP64 D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat
binary D:/a/1/dmd/generated/windows/release/64/dmd.exe
version v2.100.0
config
DFLAGS (none)
include src\importc.h
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe /P /Zc:preprocessor /PD /nologo src\core\stdc\errno.c /FIsrc\importc.h /Fierrno.i -I.
parse errno
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\vadefs.h(61): Error: missing comma or semicolon after declaration of `__anonymous`, found `uintptr_t` instead
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(96): Error: no type-specifier for parameter
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(96): Error: found `8` when expecting `,`
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(193): Error: `=`, `;` or `,` expected to end declaration instead of `typedef`
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(352): Error: no type for declarator before `__declspec`
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\corecrt.h(125): Error: missing comma or semicolon after declaration of `__anonymous`, found `__pragma` instead
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\corecrt.h(372): Error: no type for declarator before `__declspec`
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\corecrt.h(374): Error: no type for declarator before `__declspec`
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\errno.h(18): Error: missing comma or semicolon after declaration of `__anonymous`, found `__pragma` instead
src\core\stdc\errno.c(15): Error: `=`, `;` or `,` expected to end declaration instead of `int`
src\core\stdc\errno.c(18): Error: no type for declarator before `}`
--- errorlevel 1
---
Comment #1 by bugzilla — 2022-06-24T07:47:26Z
The first problem is:
__pragma(pack(push, 8))
Comment #2 by bugzilla — 2022-06-26T01:15:55Z
That was addressed by 22724.
What's left is:
__declspec(noreturn) void foo(void);
Comment #3 by dlang-bot — 2022-06-26T01:20:38Z
@WalterBright created dlang/dmd pull request #14252 "fix Issue 23206 - ImportC: __declspec(noreturn) does not compile" fixing this issue:
- fix Issue 23206 - ImportC: __declspec(noreturn) does not compile
https://github.com/dlang/dmd/pull/14252
Comment #4 by dlang-bot — 2022-06-26T01:58:43Z
dlang/dmd pull request #14252 "fix Issue 23206 - ImportC: __declspec(noreturn) does not compile" was merged into master:
- 9df64451e42743b92cc46cf99b0742eed3382125 by Walter Bright:
fix Issue 23206 - ImportC: __declspec(noreturn) does not compile
https://github.com/dlang/dmd/pull/14252