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 leav
On 1/19/24 18:18, 钟居哲 wrote:
OK. I saw the other arguments there:
tree fntype ATTRIBUTE_UNUSED,
rtx libname ATTRIBUTE_UNUSED,
So I leverage these and add ATTRIBUTE_UNUSED to 'fndecl'
Maybe it's better remove all arguments for riscv_i
_args which are
unused as you suggested.
juzhe.zh...@rivai.ai
From: Jeff Law
Date: 2024-01-20 08:52
To: Juzhe-Zhong; gcc-patches
CC: pan2.li; schwab
Subject: Re: [Committed] RISC-V: Suppress warning
On 1/19/24 17:27, Juzhe-Zhong wrote:
> ../../gcc/config/riscv/riscv.cc:
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 |
../../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/ChangeLog:
* config/riscv/riscv.c (riscv_gen_gpr_save_insn): Change type to
unsigned for i.
(riscv_gpr_save_operation_p): Change type to unsigned for i and
len.
---
gcc/config/riscv/riscv.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git