public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: 钟居哲 <juzhe.zhong@rivai.ai>, gcc-patches <gcc-patches@gcc.gnu.org>,
	"pan2.li" <pan2.li@intel.com>
Subject: Re: [Committed] RISC-V: Suppress warning
Date: Mon, 22 Jan 2024 00:29:43 +0100	[thread overview]
Message-ID: <871qaai7tk.fsf@igel.home> (raw)
In-Reply-To: <d04f3acc-e593-47f6-84b2-05c2f3d8b2cc@gmail.com> (Jeff Law's message of "Sun, 21 Jan 2024 15:51:37 -0700")

On Jan 21 2024, Jeff Law wrote:

> Yea.  The biggest problem with ATTRIBUTE_UNUSED is that it's a "may be
> unused" and thus if the code changes it's sometimes left on an parameter
> incorrectly.  C++ allows us to specify a "is definitely unused" concept by
> dropping the parameter's name, but leaving its type.

It's problematic if the parameter is only used conditionally on a macro
definition (which is less common with target hooks now being function
calls).

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

      reply	other threads:[~2024-01-21 23:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-20  0:27 Juzhe-Zhong
2024-01-20  0:52 ` Jeff Law
2024-01-20  1:18   ` 钟居哲
2024-01-21 22:51     ` Jeff Law
2024-01-21 23:29       ` Andreas Schwab [this message]

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=871qaai7tk.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=juzhe.zhong@rivai.ai \
    --cc=pan2.li@intel.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).