Fix code_helper unused argument warning for fr30

Message ID 20230817072052.w62bmpzkxyktplnb@lug-owl.de
State Unresolved
Headers
Series Fix code_helper unused argument warning for fr30 |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Jan-Benedict Glaw Aug. 17, 2023, 7:20 a.m. UTC
  Hi!

fr30 is the only target defining GO_IF_LEGITIMATE_ADDRESS right now, in
which case the `code_helper ch` argument to memory_address_addr_space_p()
is unused and emits a new warning.

gcc/ChangeLog:
	* recog.cc (memory_address_addr_space_p): Mark possibly unused
	argument as unused.




Ok for trunk?

Thanks,
  Jan-Benedict

--
  

Comments

Richard Biener Aug. 17, 2023, 10:52 a.m. UTC | #1
On Thu, Aug 17, 2023 at 9:21 AM Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
>
> Hi!
>
> fr30 is the only target defining GO_IF_LEGITIMATE_ADDRESS right now, in
> which case the `code_helper ch` argument to memory_address_addr_space_p()
> is unused and emits a new warning.

OK.

> gcc/ChangeLog:
>         * recog.cc (memory_address_addr_space_p): Mark possibly unused
>         argument as unused.
>
> diff --git a/gcc/recog.cc b/gcc/recog.cc
> index 2bff6c03e4d..92f151248a6 100644
> --- a/gcc/recog.cc
> +++ b/gcc/recog.cc
> @@ -1803,7 +1803,7 @@ pop_operand (rtx op, machine_mode mode)
>
>  bool
>  memory_address_addr_space_p (machine_mode mode ATTRIBUTE_UNUSED, rtx addr,
> -                            addr_space_t as, code_helper ch)
> +                            addr_space_t as, code_helper ch ATTRIBUTE_UNUSED)
>  {
>  #ifdef GO_IF_LEGITIMATE_ADDRESS
>    gcc_assert (ADDR_SPACE_GENERIC_P (as));
>
>
>
> Ok for trunk?
>
> Thanks,
>   Jan-Benedict
>
> --
  

Patch

diff --git a/gcc/recog.cc b/gcc/recog.cc
index 2bff6c03e4d..92f151248a6 100644
--- a/gcc/recog.cc
+++ b/gcc/recog.cc
@@ -1803,7 +1803,7 @@  pop_operand (rtx op, machine_mode mode)
 
 bool
 memory_address_addr_space_p (machine_mode mode ATTRIBUTE_UNUSED, rtx addr,
-			     addr_space_t as, code_helper ch)
+			     addr_space_t as, code_helper ch ATTRIBUTE_UNUSED)
 {
 #ifdef GO_IF_LEGITIMATE_ADDRESS
   gcc_assert (ADDR_SPACE_GENERIC_P (as));