Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Mike Frysinger <vapier@gentoo.org>,
	Simon Marchi <simon.marchi@efficios.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] sim: add __attribute__((unused)) to <arch>_fill_argbuf_tp function
Date: Thu, 14 Dec 2023 21:32:44 -0500	[thread overview]
Message-ID: <639d075f-157d-4b0f-ba48-2f130cacb6ec@simark.ca> (raw)
In-Reply-To: <ZXt2DRNGbGcce8-J@vapier>



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 <simon.marchi@polymtl.ca>

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

  reply	other threads:[~2023-12-15  2:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 16:21 Simon Marchi
2023-12-14 21:39 ` Mike Frysinger
2023-12-15  2:32   ` Simon Marchi [this message]
2023-12-15  3:46     ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=639d075f-157d-4b0f-ba48-2f130cacb6ec@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox