From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 168EE384DEDD for ; Fri, 15 Dec 2023 02:32:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 168EE384DEDD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 168EE384DEDD Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702607566; cv=none; b=qW3XVCTDqHgDRmc4Y2jtjgGrm+LmAmVcaPk/u9HLXLJL7RtUAfecoeXeQm3GAbNvGvK7mJqjt0GVsUcgqOXc3WczxlWX3PWMEWV09ppnRoT6cdUWNT58DYdLo+eWd8hn7vttLJ6Iiq4EgtAYLT8fMXBegQIxj5hDHM0ULGfw2B0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702607566; c=relaxed/simple; bh=DKrUjjivCqwLknGLb0KlQf9XHY1q+pxJVs3KpPPWmz0=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=YWsL7E607E7kgW2WnLBoEP0SWoMxFfQpV/7Y4i9teEFHGiqajzqNp0d/I/xcut3qnAqmwS60m/XnJlGh1A3hAPvYR1mmG64AGy5GlxcUZsuLGO+oNYuq6n55oYh5xLpl/30FcCUsYGpqBDNG50vZ/iR08WDqNtjqdkDAEdO5fo8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1702607564; bh=DKrUjjivCqwLknGLb0KlQf9XHY1q+pxJVs3KpPPWmz0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=iCUI4UaWIQ/gNHswmFhGjSNOzDfr1FiCkJZx5f2rpUognOXsdRZpD0XQIl3AXmRP2 zUMf2rBSm0CvFOJ5vHXUpmoF8KvMVc90uz4zaYnnKK6LkSmQiF0CnC8na73C2mUQeA 4At+bShoAVX7+IAIqTeYemTnrViB0eJcBdHbiJCU= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 7326C1E091; Thu, 14 Dec 2023 21:32:44 -0500 (EST) Message-ID: <639d075f-157d-4b0f-ba48-2f130cacb6ec@simark.ca> Date: Thu, 14 Dec 2023 21:32:44 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] sim: add __attribute__((unused)) to _fill_argbuf_tp function To: Mike Frysinger , Simon Marchi Cc: gdb-patches@sourceware.org References: <20231214162139.8415-1-simon.marchi@efficios.com> Content-Language: en-US From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 2023-12-14 16:39, Mike Frysinger wrote: > On 14 Dec 2023 11:21, Simon Marchi wrote: >> I get this when building with --enable-targets=all: >> >> CC m32r/mloopx.o >> m32r/mloopx.c:37:1: error: ‘m32rxf_fill_argbuf_tp’ defined but not used [-Werror=unused-function] >> 37 | m32rxf_fill_argbuf_tp (const SIM_CPU *cpu, ARGBUF *abuf, >> | ^~~~~~~~~~~~~~~~~~~~~ >> >> CC m32r/mloop2.o >> m32r/mloop2.c:37:1: error: ‘m32r2f_fill_argbuf_tp’ defined but not used [-Werror=unused-function] >> 37 | m32r2f_fill_argbuf_tp (const SIM_CPU *cpu, ARGBUF *abuf, >> | ^~~~~~~~~~~~~~~~~~~~~ >> >> I don't know this code, so I didn't do an in-depth analysis of the >> situation. Adding the __attribute__((unused)) makes the warning go away >> (this is what this patch does), but perhaps there's a better way or the >> warning is the sign that something is wrong. > > pretty sure this is a shortcoming in the m32r mloop2.in & mloopx.in files and > we should fix it there. the patch below should fix it. > > it also seems like the loop files are not respecting fast_p, but one thing at a > time i guess. > -mike I know nothing about that code, so I trust you on that. I tried your patch, and it works for me, so you can add my: Tested-By: Simon Marchi Btw, is it possible that the dependencies in m32r/local.mk are not correct, for the various mloop files? After applying your patch, I had to do a clean first. The rule to generate mloop2.c is: %D%/mloop2.c %D%/eng2.h: %D%/stamp-mloop-2 ; @true %D%/stamp-mloop-2: $(srccom)/genmloop.sh %D%/mloop.in Should it depend on mloop2.in instead of mloop.in? Likewise for mloopx. Simon