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.
>
> $ clang -Wsystem-headers -S winapi.c 2>&1 \
> | grep -c 'warning:.*stdcall.* not supported'
> 8082
>
> $ x86_64-w64-mingw32-clang -Wsystem-headers -S winapi.c 2>&1 \
> | grep -c 'warning:.*stdcall.* not supported'
> 0
>
> The generated assembly code is identical.
>
> The warning does not occur with __cdecl__ attribute (no difference from
> __stdcall__ in the x86_64 ABI).
>

This should be fixed in 21.1.1-2, just uploaded.  Thanks for the report.

-- 
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

Reply via email to