Re: [Committed] RISC-V: Suppress warning

2024-01-21 Thread Andreas Schwab
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

Re: [Committed] RISC-V: Suppress warning

2024-01-21 Thread Jeff Law
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

Re: Re: [Committed] RISC-V: Suppress warning

2024-01-19 Thread 钟居哲
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: In function 'v

Re: [Committed] RISC-V: Suppress warning

2024-01-19 Thread Jeff Law
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 |

[Committed] RISC-V: Suppress warning

2024-01-19 Thread Juzhe-Zhong
../../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, |

[committed] RISC-V: Suppress warning for signed and unsigned integer comparison.

2020-06-14 Thread Kito Cheng
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