From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Z/yVFe3IVmOFJRAAWB0awg (envelope-from ) for ; Mon, 24 Oct 2022 13:18:37 -0400 Received: by simark.ca (Postfix, from userid 112) id 4ACA71E112; Mon, 24 Oct 2022 13:18:37 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=cSpqew8I; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id EBFFA1E0D3 for ; Mon, 24 Oct 2022 13:18:35 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 46B62385802B for ; Mon, 24 Oct 2022 17:18:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46B62385802B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666631915; bh=f+aJYNscIADgCSsjuFu15Zk5yLyEjogyfxBzp6xadgs=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=cSpqew8ICf7rM+4v+dzfIDcq6JqmnOFymZ68t1ClwmRhKoGu2+3saC4CKziy7KgyF aLp6EWM4xB1vOTdvNa7lBWQBh1D9ukGhBISz3cS9pm68B0Z2gaRp1AC/SSBeLLYHM/ 40mOUmQR7MgJEzQ5cbjInW0zFfck7V4Lnj7Y5K1M= Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 7D67E3858421 for ; Mon, 24 Oct 2022 17:18:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7D67E3858421 Received: by smtp.gentoo.org (Postfix, from userid 559) id DFA3D340F83; Mon, 24 Oct 2022 17:18:10 +0000 (UTC) Date: Mon, 24 Oct 2022 21:48:37 +0545 To: Tsukasa OI Subject: Re: [PATCH 02/40] sim: Check known getrusage declaration existence Message-ID: Mail-Followup-To: Tsukasa OI , gdb-patches@sourceware.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XW2n++24md1ku0sN" Content-Disposition: inline In-Reply-To: X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --XW2n++24md1ku0sN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 24 Oct 2022 19:47, Tsukasa OI wrote: > On 2022/10/23 22:59, Mike Frysinger wrote: > > On 20 Oct 2022 09:32, Tsukasa OI wrote: > >> Clang generates a warning if there is a function declaration/definition > >> with zero arguments. Such declarations/definitions without a prototype= (an > >> argument list) are deprecated forms of indefinite arguments > >> ("-Wdeprecated-non-prototype"). On the default configuration, it cause= s a > >> build failure (unless "--disable-werror" is specified). > >> > >> Such getrusage function declarations are placed in three files under s= im/ppc > >> and to avoid defining those on the modern environments, this commit wi= ll > >> make the configuration script to find the known declaration of getrusa= ge > >> and defines HAVE_DECL_GETRUSAGE if it finds one. > >> > >> If we find one (and we *will* in most modern environments), we don't n= eed > >> to rely on the deprecated declarations. > >> --- > >> sim/config.h.in | 4 ++++ > >> sim/configure | 32 ++++++++++++++++++++++++++++++++ > >> sim/configure.ac | 10 ++++++++++ > >> 3 files changed, 46 insertions(+) > >=20 > > you didn't actually fix the bad prototypes in the ppc code -- just dele= te them. > > pretty sure once you do, you won't need any of these changes. >=20 > I wasn't sure that we could remove getrusage declarations without > prototype because it drops support for *really* old environments. If we > can "just" remove getrusage declarations (it seems you are okay with > it), that will get definitely simpler. the GNU sim documentation says we require an ISO C11 compiler & correspondi= ng runtime. if such a system exists that someone cares about, they can propose a patch & corresponding documentation. putting bandaids on bandaids that we can't test isn't really sustainable. -mike --XW2n++24md1ku0sN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmNWt1kACgkQQWM7n+g3 9YFJEA/+Id344Subq7/1AR5+f2rgGPUd55ZiN1opKumT4uKBfj43LOEHIOY2rqct nD0kX3TQ30Tsa+AFYsgUvE/FJRB82jMgJqc2SYtfUN9McXx8+4CPsTs/Bzf57FOi 6d3EG8QRLAy1MIqzb9AJOCpWOX3hkrcRI1kv1uawA1/43iDHbi2YmH2Oho3F7VrW 9X+uwpZ4H6ENHNQauvhbj0VMWnRhG5UxZyzPya6klcFn8/81t/HXh94zd51XpJTl i8bRUVJhR8/2mBUiGN5thO5O0ebz94BtGAIREyhqH6rbgCCorWY782VBJpG8xoVB rKrdTeHnbapeT9AGv10r/eriJNyZfEPsKfODZ41LJNSGo9wtGC30V7sUavpIjQDU j/C+ZxQnZYhNxJqDQ4yZU6UIA0a7Ft8Le6spEdfEkoWloj2bN0e1P3f0+xko/P+i L+EHX3tIaKAQ21Ppq6LluJMEkmxZ5MAyZgiIsoGmQ/gvWhmhOsP8QnY6C1VSsF+k uDkHr0iOa5sOOp8obf+v8ZE/prf7px1m2lZSQxYI9Drehkvn1v57BkE0Mfc1nqzF 4mm+H4TWFRa4jlWmwVdOm+jMqQQMIxLyGOstVO2X05q+gsE7NQUdAyJf7c95cnZO 7iDypoDzUTN60rZsrVnXNEh0W1yiyL1ddjkllsu7BCNi6WxYlGE= =otBI -----END PGP SIGNATURE----- --XW2n++24md1ku0sN--