DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 58CI8v3c1221376 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 58CI8v3c1221376 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=DrmJdmp1 X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86A1E3857C7B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1757700535; bh=ItYnMWA/Mz0IsbYOhFfFh6ZHC7SawLmd6R8IzUg6L/g=; 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=DrmJdmp18D3LJChj+YPVIyH1fnIr66OGLK93q4nn8rUxwQeXBGtUk6szpJbrPU4U8 aiMSlin89iG/d/77RgwuuvrR5fYRYNHEU32SlmfIdn22+LYhFl6XouLvE4vWcidJxG B69Wow8Jg2d77rTSdw+AWR+XvuiCnRDVBj2+2U+E= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3123F3858039 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3123F3858039 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757700466; cv=none; b=jPtHdjqbWMjDEUP80pw57gPNdVQ/E7psnXC9/DlZMTWDPmFFO3Be8B5lRkkraT/gPP27wkbDDlbW31o3J5AXe7PpA0QLlvLGUsZ3li/RsQW2ce714otQTv7/rOx3EfI5s5BKxsvpeZcj8NWjtFCjH9zb1HwiNzTPkl86lJGJy9E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757700466; c=relaxed/simple; bh=DvdtnDDThxg5PsPxCYlPz6E4OIa9RCM5PDqpMxbdvw8=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=bmblZRPPrIwyOSXPyiW6YzprNW9ZWgHcSKT5tGCaUrigsBok3+K9bCeR0JXZTrxzvrEZM9O/N3uKY/DYtHxI219YuZpuSvOC7GcuZ9Fz7Vq5xPCkf1KvvZeNvhX6kU39ZSoWNSDjAJS4/f21m01uma9Mr2CwVg206J3vmulg22A= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3123F3858039 Date: Fri, 12 Sep 2025 11:07:45 -0700 (PDT) X-X-Sender: jeremyd AT resin DOT csoft DOT net To: Christian Franke via Cygwin cc: Christian Franke Subject: Re: clang 20.1.8+21.1.1: __stdcall__ warning only from Cygwin version In-Reply-To: <5c3c354b-8662-c961-9e13-bdfd4b6a9a75@t-online.de> Message-ID: <568c797f-19cf-6da1-cef4-480e3a64445f@jdrake.com> References: <5c3c354b-8662-c961-9e13-bdfd4b6a9a75 AT t-online DOT de> MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.30 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jeremy Drake via Cygwin Reply-To: Jeremy Drake Content-Type: text/plain; charset="utf-8" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 58CI8v3c1221376 On Fri, 12 Sep 2025, Christian Franke via Cygwin wrote: > First of all: thanks for providing recent clang packages! > > Testcase: > > $ cat winapi.c > #include > 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 >       |                ^ > :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. -- 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