From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 155233858412 for ; Mon, 24 Oct 2022 10:47:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 155233858412 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id BC26A300089; Mon, 24 Oct 2022 10:47:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1666608468; bh=s0TjXI74AWr9jtvf6GIGZAkB7/ut3yuEP1FvmMX3rTk=; h=Message-ID:Date:Mime-Version:Subject:To:References:From: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=FaKcqSpi+32MgITmNuggdGoQS0Lvxf1oFQPt8yPJ/WBRpDP7Cs4Z16fWL3KbnW3vk NdE45AXOtJcL5BiDXeY7k1iWzD/eAAgNkW1OfwyLnQsBQ6lOBnuCEoi0JhUDXJEt30 WHYhlCgU+zhnn9F3x8ESCfRCkYICA72MLVk49SaA= Message-ID: Date: Mon, 24 Oct 2022 19:47:45 +0900 Mime-Version: 1.0 Subject: Re: [PATCH 02/40] sim: Check known getrusage declaration existence Content-Language: en-US To: Mike Frysinger , gdb-patches@sourceware.org References: From: Tsukasa OI In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 causes a >> build failure (unless "--disable-werror" is specified). >> >> Such getrusage function declarations are placed in three files under sim/ppc >> and to avoid defining those on the modern environments, this commit will >> make the configuration script to find the known declaration of getrusage >> and defines HAVE_DECL_GETRUSAGE if it finds one. >> >> If we find one (and we *will* in most modern environments), we don't need >> to rely on the deprecated declarations. >> --- >> sim/config.h.in | 4 ++++ >> sim/configure | 32 ++++++++++++++++++++++++++++++++ >> sim/configure.ac | 10 ++++++++++ >> 3 files changed, 46 insertions(+) > > you didn't actually fix the bad prototypes in the ppc code -- just delete them. > pretty sure once you do, you won't need any of these changes. > -mike 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. Thanks, Tsukasa