RE: [PATCH v1] RISC-V: Fix misspelled term args in error_at message

2024-02-12 Thread Li, Pan2
Committed, thanks Robin.

Pan

-Original Message-
From: Robin Dapp  
Sent: Monday, February 12, 2024 8:09 PM
To: Li, Pan2 ; gcc-patches@gcc.gnu.org
Cc: rdapp@gmail.com; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; Robin Dapp 
; Jeff Law 
Subject: Re: [PATCH v1] RISC-V: Fix misspelled term args in error_at message

OK.

Regards
 Robin



Re: [PATCH v1] RISC-V: Fix misspelled term args in error_at message

2024-02-12 Thread Robin Dapp
OK.

Regards
 Robin



RE: [PATCH v1] RISC-V: Fix misspelled term args in error_at message

2024-02-12 Thread Li, Pan2
CC Robin and Jeff.

Pan

-Original Message-
From: Li, Pan2  
Sent: Saturday, February 10, 2024 7:04 PM
To: gcc-patches@gcc.gnu.org
Cc: juzhe.zh...@rivai.ai; Li, Pan2 ; Wang, Yanzhang 
; kito.ch...@gmail.com
Subject: [PATCH v1] RISC-V: Fix misspelled term args in error_at message

From: Pan Li 

When build with "-Werror=format-diag", there will be one misspelled
term args as below. This patch would like fix it by taking the term
arguments instead.

../../gcc/config/riscv/riscv-vector-builtins.cc: In function 'tree_node*
riscv_vector::resolve_overloaded_builtin(location_t, unsigned int, tree,
vec*)':
../../gcc/config/riscv/riscv-vector-builtins.cc:4633:65: error:
misspelled term 'args' in format; use 'arguments' instead
[-Werror=format-diag]
 4633 | error_at (loc, "no matching function call to %qE with empty
  args", fndecl);

gcc/ChangeLog:

* config/riscv/riscv-vector-builtins.cc (resolve_overloaded_builtin):
Replace args to arguments for misspelled term.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/pr113766-1.c: Adjust the test cases.

Signed-off-by: Pan Li 
---
 gcc/config/riscv/riscv-vector-builtins.cc |   3 +-
 .../gcc.target/riscv/rvv/base/pr113766-1.c| 126 +-
 2 files changed, 65 insertions(+), 64 deletions(-)

diff --git a/gcc/config/riscv/riscv-vector-builtins.cc 
b/gcc/config/riscv/riscv-vector-builtins.cc
index efcdc8f1767..c5881a501d1 100644
--- a/gcc/config/riscv/riscv-vector-builtins.cc
+++ b/gcc/config/riscv/riscv-vector-builtins.cc
@@ -4630,7 +4630,8 @@ resolve_overloaded_builtin (location_t loc, unsigned int 
code, tree fndecl,
 
  Here we report error when overloaded function with empty args.  */
   if (rfun->overloaded_p && arglist->length () == 0)
-error_at (loc, "no matching function call to %qE with empty args", fndecl);
+error_at (loc, "no matching function call to %qE with empty arguments",
+ fndecl);
 
   hashval_t hash = rfun->overloaded_hash (*arglist);
   registered_function *rfn
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/pr113766-1.c 
b/gcc/testsuite/gcc.target/riscv/rvv/base/pr113766-1.c
index fd674a8895c..9e911e31117 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/base/pr113766-1.c
+++ b/gcc/testsuite/gcc.target/riscv/rvv/base/pr113766-1.c
@@ -6,96 +6,96 @@
 void
 test ()
 {
-  __riscv_vand ();  /* { dg-error {no matching function call to 
'__riscv_vand' with empty args} } */
-  __riscv_vand_tu ();   /* { dg-error {no matching function call to 
'__riscv_vand_tu' with empty args} } */
-  __riscv_vand_tumu (); /* { dg-error {no matching function call to 
'__riscv_vand_tumu' with empty args} } */
+  __riscv_vand ();  /* { dg-error {no matching function call to 
'__riscv_vand' with empty arguments} } */
+  __riscv_vand_tu ();   /* { dg-error {no matching function call to 
'__riscv_vand_tu' with empty arguments} } */
+  __riscv_vand_tumu (); /* { dg-error {no matching function call to 
'__riscv_vand_tumu' with empty arguments} } */
 
-  __riscv_vcompress (); /* { dg-error {no matching function call to 
'__riscv_vcompress' with empty args} } */
-  __riscv_vcompress_tu ();  /* { dg-error {no matching function call to 
'__riscv_vcompress_tu' with empty args} } */
+  __riscv_vcompress (); /* { dg-error {no matching function call to 
'__riscv_vcompress' with empty arguments} } */
+  __riscv_vcompress_tu ();  /* { dg-error {no matching function call to 
'__riscv_vcompress_tu' with empty arguments} } */
 
-  __riscv_vcpop (); /* { dg-error {no matching function call to 
'__riscv_vcpop' with empty args} } */
+  __riscv_vcpop (); /* { dg-error {no matching function call to 
'__riscv_vcpop' with empty arguments} } */
 
-  __riscv_vdiv ();  /* { dg-error {no matching function call to 
'__riscv_vdiv' with empty args} } */
-  __riscv_vdiv_tu ();   /* { dg-error {no matching function call to 
'__riscv_vdiv_tu' with empty args} } */
-  __riscv_vdiv_tumu (); /* { dg-error {no matching function call to 
'__riscv_vdiv_tumu' with empty args} } */
+  __riscv_vdiv ();  /* { dg-error {no matching function call to 
'__riscv_vdiv' with empty arguments} } */
+  __riscv_vdiv_tu ();   /* { dg-error {no matching function call to 
'__riscv_vdiv_tu' with empty arguments} } */
+  __riscv_vdiv_tumu (); /* { dg-error {no matching function call to 
'__riscv_vdiv_tumu' with empty arguments} } */
 
-  __riscv_vfabs (); /* { dg-error {no matching function call to 
'__riscv_vfabs' with empty args} } */
-  __riscv_vfabs_tu ();  /* { dg-error {no matching function call to 
'__riscv_vfabs_tu' with empty args} } */
-  __riscv_vfabs_tumu ();/* { dg-error {no matching function call to 
'__riscv_vfabs_tumu' with empty args} } */
+  __riscv_vfabs (); /* { dg-error 

[PATCH v1] RISC-V: Fix misspelled term args in error_at message

2024-02-10 Thread pan2 . li
From: Pan Li 

When build with "-Werror=format-diag", there will be one misspelled
term args as below. This patch would like fix it by taking the term
arguments instead.

../../gcc/config/riscv/riscv-vector-builtins.cc: In function 'tree_node*
riscv_vector::resolve_overloaded_builtin(location_t, unsigned int, tree,
vec*)':
../../gcc/config/riscv/riscv-vector-builtins.cc:4633:65: error:
misspelled term 'args' in format; use 'arguments' instead
[-Werror=format-diag]
 4633 | error_at (loc, "no matching function call to %qE with empty
  args", fndecl);

gcc/ChangeLog:

* config/riscv/riscv-vector-builtins.cc (resolve_overloaded_builtin):
Replace args to arguments for misspelled term.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/pr113766-1.c: Adjust the test cases.

Signed-off-by: Pan Li 
---
 gcc/config/riscv/riscv-vector-builtins.cc |   3 +-
 .../gcc.target/riscv/rvv/base/pr113766-1.c| 126 +-
 2 files changed, 65 insertions(+), 64 deletions(-)

diff --git a/gcc/config/riscv/riscv-vector-builtins.cc 
b/gcc/config/riscv/riscv-vector-builtins.cc
index efcdc8f1767..c5881a501d1 100644
--- a/gcc/config/riscv/riscv-vector-builtins.cc
+++ b/gcc/config/riscv/riscv-vector-builtins.cc
@@ -4630,7 +4630,8 @@ resolve_overloaded_builtin (location_t loc, unsigned int 
code, tree fndecl,
 
  Here we report error when overloaded function with empty args.  */
   if (rfun->overloaded_p && arglist->length () == 0)
-error_at (loc, "no matching function call to %qE with empty args", fndecl);
+error_at (loc, "no matching function call to %qE with empty arguments",
+ fndecl);
 
   hashval_t hash = rfun->overloaded_hash (*arglist);
   registered_function *rfn
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/pr113766-1.c 
b/gcc/testsuite/gcc.target/riscv/rvv/base/pr113766-1.c
index fd674a8895c..9e911e31117 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/base/pr113766-1.c
+++ b/gcc/testsuite/gcc.target/riscv/rvv/base/pr113766-1.c
@@ -6,96 +6,96 @@
 void
 test ()
 {
-  __riscv_vand ();  /* { dg-error {no matching function call to 
'__riscv_vand' with empty args} } */
-  __riscv_vand_tu ();   /* { dg-error {no matching function call to 
'__riscv_vand_tu' with empty args} } */
-  __riscv_vand_tumu (); /* { dg-error {no matching function call to 
'__riscv_vand_tumu' with empty args} } */
+  __riscv_vand ();  /* { dg-error {no matching function call to 
'__riscv_vand' with empty arguments} } */
+  __riscv_vand_tu ();   /* { dg-error {no matching function call to 
'__riscv_vand_tu' with empty arguments} } */
+  __riscv_vand_tumu (); /* { dg-error {no matching function call to 
'__riscv_vand_tumu' with empty arguments} } */
 
-  __riscv_vcompress (); /* { dg-error {no matching function call to 
'__riscv_vcompress' with empty args} } */
-  __riscv_vcompress_tu ();  /* { dg-error {no matching function call to 
'__riscv_vcompress_tu' with empty args} } */
+  __riscv_vcompress (); /* { dg-error {no matching function call to 
'__riscv_vcompress' with empty arguments} } */
+  __riscv_vcompress_tu ();  /* { dg-error {no matching function call to 
'__riscv_vcompress_tu' with empty arguments} } */
 
-  __riscv_vcpop (); /* { dg-error {no matching function call to 
'__riscv_vcpop' with empty args} } */
+  __riscv_vcpop (); /* { dg-error {no matching function call to 
'__riscv_vcpop' with empty arguments} } */
 
-  __riscv_vdiv ();  /* { dg-error {no matching function call to 
'__riscv_vdiv' with empty args} } */
-  __riscv_vdiv_tu ();   /* { dg-error {no matching function call to 
'__riscv_vdiv_tu' with empty args} } */
-  __riscv_vdiv_tumu (); /* { dg-error {no matching function call to 
'__riscv_vdiv_tumu' with empty args} } */
+  __riscv_vdiv ();  /* { dg-error {no matching function call to 
'__riscv_vdiv' with empty arguments} } */
+  __riscv_vdiv_tu ();   /* { dg-error {no matching function call to 
'__riscv_vdiv_tu' with empty arguments} } */
+  __riscv_vdiv_tumu (); /* { dg-error {no matching function call to 
'__riscv_vdiv_tumu' with empty arguments} } */
 
-  __riscv_vfabs (); /* { dg-error {no matching function call to 
'__riscv_vfabs' with empty args} } */
-  __riscv_vfabs_tu ();  /* { dg-error {no matching function call to 
'__riscv_vfabs_tu' with empty args} } */
-  __riscv_vfabs_tumu ();/* { dg-error {no matching function call to 
'__riscv_vfabs_tumu' with empty args} } */
+  __riscv_vfabs (); /* { dg-error {no matching function call to 
'__riscv_vfabs' with empty arguments} } */
+  __riscv_vfabs_tu ();  /* { dg-error {no matching function call to 
'__riscv_vfabs_tu' with empty arguments} } */
+  __riscv_vfabs_tumu ();/* { dg-error {no matching function call to 
'__riscv_vfabs_tumu' with empty arguments} } */
 
-  __riscv_vfadd ();