On Fri, 12 Sep 2025, Jeremy Drake via Cygwin wrote: > On Fri, 12 Sep 2025, Christian Franke via Cygwin wrote: > > > First of all: thanks for providing recent clang packages! > > > > Testcase: > > > > $ cat winapi.c > > #include <windows.h> > > int WINAPI SomeDllFunction(int, int, int, int, int); > > > > int call_it() > > { > > return SomeDllFunction(1, 2, 3, 4, 5); > > } > > > > $ clang -S winapi.c # with 20.1.8 and 21.1.1 > > winapi.c:2:5: warning: '__stdcall__' calling convention is not supported > > for this target > > [-Wignored-attributes] > > 2 | int WINAPI SomeDllFunction(int, int, int, int, int); > > | ^ > > /usr/include/w32api/minwindef.h:98:16: note: expanded from macro 'WINAPI' > > 98 | #define WINAPI __stdcall > > | ^ > > <built-in>:400:34: note: expanded from macro '__stdcall' > > 400 | #define __stdcall __attribute__((__stdcall__)) > > | ^ > > 1 warning generated. > > > > I was wondering about this one when trying to figure out what Windows > behaviors should be enabled for Cygwin. It is a fact that x86_64 doesn't > support stdcall/thiscall/fastcall, but for Windows targets those calling > conventions are silently ignored rather than warned about. > > Another thing that's got me confused in that vicinity is sysv_abi vs > ms_abi calling convention attribute. I think Cygwin defaults to ms_abi > so should allow __attribute__((sysv_abi)) to override, but I think it > would warn about that.
https://github.com/llvm/llvm-project/pull/158385 if you're interested in following it. -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple