DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 58D0EXs01387152
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 58D0EXs01387152
Authentication-Results: delorie.com;
	dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=L+XjvEUH
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D77493857C67
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1757722470;
	bh=MucU7sdpIFssHbGa9qZHQin9iHpk/wwCqbLpQCobdIA=;
	h=Date:To:cc:Subject:In-Reply-To:References:List-Id:
	 List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
	 From:Reply-To:From;
	b=L+XjvEUHEwO7MZ+/DrjzP9QG2Y/eTgUy1B0z8qJhaFU9Pccy40b6y5oA2hB24rmyN
	 6aZxib+mxqqqXLG6hpLdJaOoDrQQa9shVkXEMLP54waa3SaniLIZt7Wt00KUCLtgkJ
	 XWDLhX/6I12DzfFAA1FbAprbJNr91+KmglEnxvS8=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 303743858D21
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 303743858D21
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757722441; cv=none;
 b=a1zOexggurAwO5ihhRgnlaIjdczG568BcIINx50H/5fb0uzOh1kCWT3G6/vJ4Lvzi0VoxV1kXqrGJCgG3y9XLu7mFuq1M7Zioo8yUx0wkqdOsbhOEmmoYoTSDoNGih/v0/IzHipCEdiI5yxv625jh0Vk12Y65scsbcGiQLdvUuA=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1757722441; c=relaxed/simple;
 bh=kffl3pSrTcYRGXe7rEGLANHxfyrzvY6cSnlS4uvML3M=;
 h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;
 b=IF6nb2vEn6cTXo88Erf/bAWRrsP+8k3LCQjcCsD9OIJBAtZspDKYvxK766nzWspAiWk++DjIh/5cDB6AP4VI/v2P1bIEtxv1jA0gLBFvMjxka8sq0VyxwSShX6nKDzedIQSZnmIzK7qr5nWtHxI8IHgGCUZFYkep3tAiyz4lHbQ=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 303743858D21
Date: Fri, 12 Sep 2025 17:14:00 -0700 (PDT)
X-X-Sender: jeremyd@resin.csoft.net
To: Christian Franke via Cygwin <cygwin@cygwin.com>
cc: Christian Franke <Christian.Franke@t-online.de>
Subject: Re: clang 20.1.8+21.1.1: __stdcall__ warning only from Cygwin version
In-Reply-To: <568c797f-19cf-6da1-cef4-480e3a64445f@jdrake.com>
Message-ID: <dd20d5f4-e3b4-11d5-c249-f076abc926e5@jdrake.com>
References: <5c3c354b-8662-c961-9e13-bdfd4b6a9a75@t-online.de>
 <568c797f-19cf-6da1-cef4-480e3a64445f@jdrake.com>
MIME-Version: 1.0
X-Content-Filtered-By: Mailman/MimeDel 2.1.30
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Jeremy Drake via Cygwin <cygwin@cygwin.com>
Reply-To: Jeremy Drake <cygwin@jdrake.com>
Content-Type: text/plain; charset="utf-8"
Errors-To: cygwin-bounces~archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 58D0EXs01387152

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

