public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/Wformat-diag-targets-part-2)] nds32: fix -Wformat-diag warning.
@ 2022-01-18 13:46 Martin Liska
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2022-01-18 13:46 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:d909cede73a1c17ffb9ccbfd882b562fa212087f

commit d909cede73a1c17ffb9ccbfd882b562fa212087f
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Jan 18 14:24:21 2022 +0100

    nds32: fix -Wformat-diag warning.
    
    gcc/ChangeLog:
    
            * config/nds32/nds32-intrinsic.cc (nds32_expand_builtin_impl):
            Fix warnings.
            * config/nds32/nds32-intrinsic.md: Likewise.
            * config/nds32/nds32-isr.cc (nds32_check_isr_attrs_conflict): Likewise.
            * config/nds32/nds32.cc (nds32_print_operand): Likewise.
            (nds32_insert_attributes): Likewise.

Diff:
---
 gcc/config/nds32/nds32-intrinsic.cc |  6 +++---
 gcc/config/nds32/nds32-intrinsic.md | 28 ++++++++++++++--------------
 gcc/config/nds32/nds32-isr.cc       |  2 +-
 gcc/config/nds32/nds32.cc           | 14 +++++++-------
 4 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/gcc/config/nds32/nds32-intrinsic.cc b/gcc/config/nds32/nds32-intrinsic.cc
index 3c297cfeece..2f2cd7c791e 100644
--- a/gcc/config/nds32/nds32-intrinsic.cc
+++ b/gcc/config/nds32/nds32-intrinsic.cc
@@ -1013,7 +1013,7 @@ nds32_expand_builtin_impl (tree exp,
       /* Both v3s and v3f toolchains define TARGET_FPU_SINGLE.  */
       if (!TARGET_FPU_SINGLE)
 	{
-	  error ("this builtin function is only available "
+	  error ("this built-in function is only available "
 		 "on the v3s or v3f toolchain");
 	  return NULL_RTX;
 	}
@@ -1025,7 +1025,7 @@ nds32_expand_builtin_impl (tree exp,
       /* Only v3f toolchain defines TARGET_FPU_DOUBLE.  */
       if (!TARGET_FPU_DOUBLE)
 	{
-	  error ("this builtin function is only available "
+	  error ("this built-in function is only available "
 		 "on the v3f toolchain");
 	  return NULL_RTX;
 	}
@@ -1040,7 +1040,7 @@ nds32_expand_builtin_impl (tree exp,
     case NDS32_BUILTIN_SBUP:
       if (TARGET_ISA_V3M)
 	{
-	  error ("this builtin function not support "
+	  error ("this built-in function not support "
 		 "on the v3m toolchain");
 	  return NULL_RTX;
 	}
diff --git a/gcc/config/nds32/nds32-intrinsic.md b/gcc/config/nds32/nds32-intrinsic.md
index 45b10f0665d..d7229cdbaa9 100644
--- a/gcc/config/nds32/nds32-intrinsic.md
+++ b/gcc/config/nds32/nds32-intrinsic.md
@@ -301,8 +301,8 @@
       offset = 32;
     }
   else
-    error ("__nds32__clr_pending_hwint not support NDS32_INT_SWI,"
-	   " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("%<__nds32__clr_pending_hwint%> not support %<NDS32_INT_SWI%>,"
+	   " %<NDS32_INT_ALZ%>, %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   /* $INT_PEND type is write one clear.  */
   clr_hwint = GEN_INT (1 << (INTVAL (operands[0]) - offset));
@@ -359,8 +359,8 @@
       operands[2] = GEN_INT (31 - (INTVAL (operands[1]) - 32));
     }
   else
-    error ("get_pending_int not support NDS32_INT_ALZ,"
-	   " NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("%<get_pending_int%> not support %<NDS32_INT_ALZ%>,"
+	   " %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   /* mfsr op0, sytem_reg  */
   if (system_reg != NULL_RTX)
@@ -417,8 +417,8 @@
       offset = 48;
     }
   else
-    error ("set_int_priority not support NDS32_INT_SWI,"
-	   " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("i%<set_int_priority%> not support %<NDS32_INT_SWI%>,"
+	   " %<NDS32_INT_ALZ%>, %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   mask = GEN_INT (~(3 << 2 * (INTVAL (operands[0]) - offset)));
   priority = GEN_INT ((int) (INTVAL (operands[1])
@@ -477,8 +477,8 @@
       offset = 48;
     }
   else
-    error ("set_int_priority not support NDS32_INT_SWI,"
-	   " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("%<set_int_priority%> not support %<NDS32_INT_SWI%>,"
+	   " %<NDS32_INT_ALZ%>, %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   priority = GEN_INT (31 - 2 * (INTVAL (operands[1]) - offset));
 
@@ -514,8 +514,8 @@
       offset = 32;
     }
   else
-    error ("__nds32__set_trig_type_level not support NDS32_INT_SWI,"
-	   " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("%<__nds32__set_trig_type_level%> not support %<NDS32_INT_SWI%>,"
+	   " %<NDS32_INT_ALZ%>, %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   if (system_reg != NULL_RTX)
     {
@@ -551,8 +551,8 @@
       offset = 32;
     }
   else
-    error ("__nds32__set_trig_type_edge not support NDS32_INT_SWI,"
-	   " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("%<__nds32__set_trig_type_edge%> not support %<NDS32_INT_SWI%>,"
+	   " %<NDS32_INT_ALZ%>, %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   if (system_reg != NULL_RTX)
     {
@@ -588,8 +588,8 @@
       offset = 32;
     }
   else
-    error ("__nds32__get_trig_type not support NDS32_INT_SWI,"
-	   " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("%<__nds32__get_trig_type%> not support %<NDS32_INT_SWI%>,"
+	   " %<NDS32_INT_ALZ%>, %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   if (system_reg != NULL_RTX)
     {
diff --git a/gcc/config/nds32/nds32-isr.cc b/gcc/config/nds32/nds32-isr.cc
index 344fb7057d1..eef2d862bd0 100644
--- a/gcc/config/nds32/nds32-isr.cc
+++ b/gcc/config/nds32/nds32-isr.cc
@@ -614,7 +614,7 @@ nds32_check_isr_attrs_conflict (tree func_decl, tree func_attrs)
     partial_save_p = 1;
 
   if ((save_all_p + partial_save_p) > 1)
-    error ("multiple save reg attributes to function %qD", func_decl);
+    error ("multiple save register attributes to function %qD", func_decl);
 
   /* We must check at MOST one attribute to set nested-type.  */
   if (lookup_attribute ("nested", func_attrs))
diff --git a/gcc/config/nds32/nds32.cc b/gcc/config/nds32/nds32.cc
index aab02ff2ae9..71fe9e8bcd6 100644
--- a/gcc/config/nds32/nds32.cc
+++ b/gcc/config/nds32/nds32.cc
@@ -3476,35 +3476,35 @@ nds32_print_operand (FILE *stream, rtx x, int code)
     case 'R': /* cctl valck  */
       /* Note the cctl divide to 5 group and share the same name table.  */
       if (op_value < 0 || op_value > 4)
-	error ("CCTL intrinsic function subtype out of range!");
+	error ("CCTL intrinsic function subtype out of range");
       fprintf (stream, "%s", nds32_cctl_names[op_value]);
       return;
 
     case 'T': /* cctl idxwbinv  */
       /* Note the cctl divide to 5 group and share the same name table.  */
       if (op_value < 0 || op_value > 4)
-	error ("CCTL intrinsic function subtype out of range!");
+	error ("CCTL intrinsic function subtype out of range");
       fprintf (stream, "%s", nds32_cctl_names[op_value + 4]);
       return;
 
     case 'U': /* cctl vawbinv  */
       /* Note the cctl divide to 5 group and share the same name table.  */
       if (op_value < 0 || op_value > 4)
-	error ("CCTL intrinsic function subtype out of range!");
+	error ("CCTL intrinsic function subtype out of range");
       fprintf (stream, "%s", nds32_cctl_names[op_value + 8]);
       return;
 
     case 'X': /* cctl idxread  */
       /* Note the cctl divide to 5 group and share the same name table.  */
       if (op_value < 0 || op_value > 4)
-	error ("CCTL intrinsic function subtype out of range!");
+	error ("CCTL intrinsic function subtype out of range");
       fprintf (stream, "%s", nds32_cctl_names[op_value + 12]);
       return;
 
     case 'W': /* cctl idxwitre  */
       /* Note the cctl divide to 5 group and share the same name table.  */
       if (op_value < 0 || op_value > 4)
-	error ("CCTL intrinsic function subtype out of range!");
+	error ("CCTL intrinsic function subtype out of range");
       fprintf (stream, "%s", nds32_cctl_names[op_value + 16]);
       return;
 
@@ -3941,7 +3941,7 @@ nds32_insert_attributes (tree decl, tree *attributes)
       tree new_attrs = *attributes;
 
       if (TARGET_LINUX_ABI)
-	error("cannot use indirect_call attribute under linux toolchain");
+	error ("cannot use %<indirect_call%> attribute under linux toolchain");
 
       if (lookup_attribute ("noinline", new_attrs) == NULL)
 	new_attrs = tree_cons (get_identifier ("noinline"), NULL, new_attrs);
@@ -3949,7 +3949,7 @@ nds32_insert_attributes (tree decl, tree *attributes)
 	new_attrs = tree_cons (get_identifier ("noclone"), NULL, new_attrs);
 
       if (!TREE_PUBLIC (decl))
-	error ("indirect_call attribute can%'t apply for static function");
+	error ("%<indirect_call%> attribute cannot apply for static function");
 
       *attributes = new_attrs;
     }


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gcc(refs/users/marxin/heads/Wformat-diag-targets-part-2)] nds32: fix -Wformat-diag warning.
@ 2022-01-18 13:32 Martin Liska
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2022-01-18 13:32 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b81f0d55bbef68f9809d880e2fe7875a92bf0cca

commit b81f0d55bbef68f9809d880e2fe7875a92bf0cca
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Jan 18 14:24:21 2022 +0100

    nds32: fix -Wformat-diag warning.
    
    gcc/ChangeLog:
    
            * config/nds32/nds32-intrinsic.cc (nds32_expand_builtin_impl):
            Fix warnings.
            * config/nds32/nds32-intrinsic.md: Likewise.
            * config/nds32/nds32-isr.cc (nds32_check_isr_attrs_conflict): Likewise.
            * config/nds32/nds32.cc (nds32_print_operand): Likewise.
            (nds32_insert_attributes): Likewise.

Diff:
---
 gcc/config/nds32/nds32-intrinsic.cc |  6 +++---
 gcc/config/nds32/nds32-intrinsic.md | 28 ++++++++++++++--------------
 gcc/config/nds32/nds32-isr.cc       |  2 +-
 gcc/config/nds32/nds32.cc           | 14 +++++++-------
 4 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/gcc/config/nds32/nds32-intrinsic.cc b/gcc/config/nds32/nds32-intrinsic.cc
index 3c297cfeece..2f2cd7c791e 100644
--- a/gcc/config/nds32/nds32-intrinsic.cc
+++ b/gcc/config/nds32/nds32-intrinsic.cc
@@ -1013,7 +1013,7 @@ nds32_expand_builtin_impl (tree exp,
       /* Both v3s and v3f toolchains define TARGET_FPU_SINGLE.  */
       if (!TARGET_FPU_SINGLE)
 	{
-	  error ("this builtin function is only available "
+	  error ("this built-in function is only available "
 		 "on the v3s or v3f toolchain");
 	  return NULL_RTX;
 	}
@@ -1025,7 +1025,7 @@ nds32_expand_builtin_impl (tree exp,
       /* Only v3f toolchain defines TARGET_FPU_DOUBLE.  */
       if (!TARGET_FPU_DOUBLE)
 	{
-	  error ("this builtin function is only available "
+	  error ("this built-in function is only available "
 		 "on the v3f toolchain");
 	  return NULL_RTX;
 	}
@@ -1040,7 +1040,7 @@ nds32_expand_builtin_impl (tree exp,
     case NDS32_BUILTIN_SBUP:
       if (TARGET_ISA_V3M)
 	{
-	  error ("this builtin function not support "
+	  error ("this built-in function not support "
 		 "on the v3m toolchain");
 	  return NULL_RTX;
 	}
diff --git a/gcc/config/nds32/nds32-intrinsic.md b/gcc/config/nds32/nds32-intrinsic.md
index 45b10f0665d..d7229cdbaa9 100644
--- a/gcc/config/nds32/nds32-intrinsic.md
+++ b/gcc/config/nds32/nds32-intrinsic.md
@@ -301,8 +301,8 @@
       offset = 32;
     }
   else
-    error ("__nds32__clr_pending_hwint not support NDS32_INT_SWI,"
-	   " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("%<__nds32__clr_pending_hwint%> not support %<NDS32_INT_SWI%>,"
+	   " %<NDS32_INT_ALZ%>, %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   /* $INT_PEND type is write one clear.  */
   clr_hwint = GEN_INT (1 << (INTVAL (operands[0]) - offset));
@@ -359,8 +359,8 @@
       operands[2] = GEN_INT (31 - (INTVAL (operands[1]) - 32));
     }
   else
-    error ("get_pending_int not support NDS32_INT_ALZ,"
-	   " NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("%<get_pending_int%> not support %<NDS32_INT_ALZ%>,"
+	   " %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   /* mfsr op0, sytem_reg  */
   if (system_reg != NULL_RTX)
@@ -417,8 +417,8 @@
       offset = 48;
     }
   else
-    error ("set_int_priority not support NDS32_INT_SWI,"
-	   " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("i%<set_int_priority%> not support %<NDS32_INT_SWI%>,"
+	   " %<NDS32_INT_ALZ%>, %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   mask = GEN_INT (~(3 << 2 * (INTVAL (operands[0]) - offset)));
   priority = GEN_INT ((int) (INTVAL (operands[1])
@@ -477,8 +477,8 @@
       offset = 48;
     }
   else
-    error ("set_int_priority not support NDS32_INT_SWI,"
-	   " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("%<set_int_priority%> not support %<NDS32_INT_SWI%>,"
+	   " %<NDS32_INT_ALZ%>, %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   priority = GEN_INT (31 - 2 * (INTVAL (operands[1]) - offset));
 
@@ -514,8 +514,8 @@
       offset = 32;
     }
   else
-    error ("__nds32__set_trig_type_level not support NDS32_INT_SWI,"
-	   " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("%<__nds32__set_trig_type_level%> not support %<NDS32_INT_SWI%>,"
+	   " %<NDS32_INT_ALZ%>, %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   if (system_reg != NULL_RTX)
     {
@@ -551,8 +551,8 @@
       offset = 32;
     }
   else
-    error ("__nds32__set_trig_type_edge not support NDS32_INT_SWI,"
-	   " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("%<__nds32__set_trig_type_edge%> not support %<NDS32_INT_SWI%>,"
+	   " %<NDS32_INT_ALZ%>, %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   if (system_reg != NULL_RTX)
     {
@@ -588,8 +588,8 @@
       offset = 32;
     }
   else
-    error ("__nds32__get_trig_type not support NDS32_INT_SWI,"
-	   " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
+    error ("%<__nds32__get_trig_type%> not support %<NDS32_INT_SWI%>,"
+	   " %<NDS32_INT_ALZ%>, %<NDS32_INT_IDIVZE%>, %<NDS32_INT_DSSIM%>");
 
   if (system_reg != NULL_RTX)
     {
diff --git a/gcc/config/nds32/nds32-isr.cc b/gcc/config/nds32/nds32-isr.cc
index 344fb7057d1..eef2d862bd0 100644
--- a/gcc/config/nds32/nds32-isr.cc
+++ b/gcc/config/nds32/nds32-isr.cc
@@ -614,7 +614,7 @@ nds32_check_isr_attrs_conflict (tree func_decl, tree func_attrs)
     partial_save_p = 1;
 
   if ((save_all_p + partial_save_p) > 1)
-    error ("multiple save reg attributes to function %qD", func_decl);
+    error ("multiple save register attributes to function %qD", func_decl);
 
   /* We must check at MOST one attribute to set nested-type.  */
   if (lookup_attribute ("nested", func_attrs))
diff --git a/gcc/config/nds32/nds32.cc b/gcc/config/nds32/nds32.cc
index aab02ff2ae9..71fe9e8bcd6 100644
--- a/gcc/config/nds32/nds32.cc
+++ b/gcc/config/nds32/nds32.cc
@@ -3476,35 +3476,35 @@ nds32_print_operand (FILE *stream, rtx x, int code)
     case 'R': /* cctl valck  */
       /* Note the cctl divide to 5 group and share the same name table.  */
       if (op_value < 0 || op_value > 4)
-	error ("CCTL intrinsic function subtype out of range!");
+	error ("CCTL intrinsic function subtype out of range");
       fprintf (stream, "%s", nds32_cctl_names[op_value]);
       return;
 
     case 'T': /* cctl idxwbinv  */
       /* Note the cctl divide to 5 group and share the same name table.  */
       if (op_value < 0 || op_value > 4)
-	error ("CCTL intrinsic function subtype out of range!");
+	error ("CCTL intrinsic function subtype out of range");
       fprintf (stream, "%s", nds32_cctl_names[op_value + 4]);
       return;
 
     case 'U': /* cctl vawbinv  */
       /* Note the cctl divide to 5 group and share the same name table.  */
       if (op_value < 0 || op_value > 4)
-	error ("CCTL intrinsic function subtype out of range!");
+	error ("CCTL intrinsic function subtype out of range");
       fprintf (stream, "%s", nds32_cctl_names[op_value + 8]);
       return;
 
     case 'X': /* cctl idxread  */
       /* Note the cctl divide to 5 group and share the same name table.  */
       if (op_value < 0 || op_value > 4)
-	error ("CCTL intrinsic function subtype out of range!");
+	error ("CCTL intrinsic function subtype out of range");
       fprintf (stream, "%s", nds32_cctl_names[op_value + 12]);
       return;
 
     case 'W': /* cctl idxwitre  */
       /* Note the cctl divide to 5 group and share the same name table.  */
       if (op_value < 0 || op_value > 4)
-	error ("CCTL intrinsic function subtype out of range!");
+	error ("CCTL intrinsic function subtype out of range");
       fprintf (stream, "%s", nds32_cctl_names[op_value + 16]);
       return;
 
@@ -3941,7 +3941,7 @@ nds32_insert_attributes (tree decl, tree *attributes)
       tree new_attrs = *attributes;
 
       if (TARGET_LINUX_ABI)
-	error("cannot use indirect_call attribute under linux toolchain");
+	error ("cannot use %<indirect_call%> attribute under linux toolchain");
 
       if (lookup_attribute ("noinline", new_attrs) == NULL)
 	new_attrs = tree_cons (get_identifier ("noinline"), NULL, new_attrs);
@@ -3949,7 +3949,7 @@ nds32_insert_attributes (tree decl, tree *attributes)
 	new_attrs = tree_cons (get_identifier ("noclone"), NULL, new_attrs);
 
       if (!TREE_PUBLIC (decl))
-	error ("indirect_call attribute can%'t apply for static function");
+	error ("%<indirect_call%> attribute cannot apply for static function");
 
       *attributes = new_attrs;
     }


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-18 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18 13:46 [gcc(refs/users/marxin/heads/Wformat-diag-targets-part-2)] nds32: fix -Wformat-diag warning Martin Liska
  -- strict thread matches above, loose matches on Subject: below --
2022-01-18 13:32 Martin Liska

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).