public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Juzhe-Zhong <juzhe.zhong@rivai.ai>, gcc-patches@gcc.gnu.org
Cc: pan2.li@intel.com, schwab@linux-m68k.org
Subject: Re: [Committed] RISC-V: Suppress warning
Date: Fri, 19 Jan 2024 17:52:53 -0700	[thread overview]
Message-ID: <6015693d-ec76-4737-a4a1-f319418bafc5@gmail.com> (raw)
In-Reply-To: <20240120002739.2860933-1-juzhe.zhong@rivai.ai>



On 1/19/24 17:27, Juzhe-Zhong wrote:
> ../../gcc/config/riscv/riscv.cc: In function 'void riscv_init_cumulative_args(CUMULATIVE_ARGS*, tree, rtx, tree, int)':
> ../../gcc/config/riscv/riscv.cc:4879:34: error: unused parameter 'fndecl' [-Werror=unused-parameter]
> 4879 |                             tree fndecl,
>        |                             ~~~~~^~~~~~
> ../../gcc/config/riscv/riscv.cc: In function 'bool riscv_vector_mode_supported_any_target_p(machine_mode)':
> ../../gcc/config/riscv/riscv.cc:10537:56: error: unused parameter 'mode' [-Werror=unused-parameter]
> 10537 | riscv_vector_mode_supported_any_target_p (machine_mode mode)
>        |                                           ~~~~~~~~~~~~~^~~~
> cc1plus: all warnings being treated as errors
> make[3]: *** [Makefile:2559: riscv.o] Error 1
> 
> Suppress these warnings.
> 
> gcc/ChangeLog:
> 
> 	* config/riscv/riscv.cc (riscv_init_cumulative_args): Suppress warning.
> 	(riscv_vector_mode_supported_any_target_p): Ditto.
There's actually more cleanup to do in there ;-) One of the arguments 
currently marked as unused is actually used.  And the better way to 
handle unused arguments is to just drop their name (like you did with 
riscv_vector_mode_supported_any_target_p).

I'm actually in the process of bootstrapping and regression testing the 
additional fixes to riscv_init_cumulative_args.

jeff

  reply	other threads:[~2024-01-20  0:52 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 [this message]
2024-01-20  1:18   ` 钟居哲
2024-01-21 22:51     ` Jeff Law
2024-01-21 23:29       ` Andreas Schwab

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=6015693d-ec76-4737-a4a1-f319418bafc5@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juzhe.zhong@rivai.ai \
    --cc=pan2.li@intel.com \
    --cc=schwab@linux-m68k.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).