From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id C8EC3385626B; Wed, 11 May 2022 16:43:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C8EC3385626B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.91,217,1647331200"; d="scan'208";a="75763159" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 11 May 2022 08:43:49 -0800 IronPort-SDR: bxC5Pv00c8LIQ+/kTfKnKawmSMhd+p7nbZfvfxh3BP7SR+IV6vNSg+SvpxM0RiTVerMBZ7+XEl ++12NP9H8BvqkgU5g1e4cv3tSRJ4ssHYPVZC+f+2SJrpDqSgwit8PPkHkLSQAeAQrCjy9YNUiS Ofr08cVrYs1XdZl+WS9/tv7Bk+jYQBcWhLIWqolV7PMUtWgEZglZyeRMZEppqvwsLdvMzE5EAz 5pjfCPikF6z3JiPWYX9/2O6TxD2tGDU/HJqwbgMjYDYwT4x1hkbv4uJzasBgIwFnVlGW5jXyPa GlE= Date: Wed, 11 May 2022 16:43:14 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: =?ISO-8859-15?Q?Martin_Li=A8ka?= CC: Tomas Kalibera , , Marek Polacek , Subject: Re: [PATCH] [12/11/10] Fix invalid format warnings on Windows In-Reply-To: <8f515605-4fc0-148d-3011-a79f672ea025@suse.cz> Message-ID: References: <466c29c3-54b1-5627-3d9d-e385ad037a4e@suse.cz> <7fd8d3fb-e0c6-decc-374f-495ab81ab1ff@gmail.com> <8f515605-4fc0-148d-3011-a79f672ea025@suse.cz> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3113.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2022 16:43:51 -0000 On Wed, 11 May 2022, Martin Liška wrote: > May I please ping review for this? There are various coding style issues in the patch; at least missing space before '(' and '&&' at end of line (should be at start of line). It will also need to be updated for .c files having been renamed to .cc in the GCC source tree. I'd also like to check that "if mingw-w64 is configured to target UCRT" is not something that is necessarily known when GCC is built or from the command-line options passed to GCC. Because ideally one might expect the TARGET_OVERRIDES_FORMAT_ATTRIBUTES / TARGET_OVERRIDES_FORMAT_INIT definitions to handle things appropriately conditionally, so that printf attributes are handled as gnu_printf for the "if mingw-w64 is configured to target UCRT" case. Disregarding a built-in format attribute when one is also specified explicitly in the header, even though the two are not exactly equivalent attributes, as in this patch, seems more like the right approach in the case where the attributes in installed header (at the time GCC is run, not the time it is built) *are* the way in which GCC gets the "configured to target UCRT" information - as opposed to it being something available before the header is parsed. -- Joseph S. Myers joseph@codesourcery.com