public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] epiphany: fir -Wformat-diag.
@ 2022-01-12  9:57 Martin Liška
  2022-01-12 16:21 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2022-01-12  9:57 UTC (permalink / raw)
  To: gcc-patches; +Cc: gnu

This fixes -Wformat-diag warnings.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

	* config/epiphany/epiphany.c (epiphany_handle_interrupt_attribute):
	Use %qs format specifier.
	(epiphany_override_options): Wrap keyword in %<, %>.
---
  gcc/config/epiphany/epiphany.c | 10 ++++++----
  1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c
index 88283419dc1..c9c321560de 100644
--- a/gcc/config/epiphany/epiphany.c
+++ b/gcc/config/epiphany/epiphany.c
@@ -520,8 +520,10 @@ epiphany_handle_interrupt_attribute (tree *node, tree name, tree args,
  	   && strcmp (TREE_STRING_POINTER (value), "swi"))
      {
        warning (OPT_Wattributes,
-	       "argument of %qE attribute is not \"reset\", \"software_exception\", \"page_miss\", \"timer0\", \"timer1\", \"message\", \"dma0\", \"dma1\", \"wand\" or \"swi\"",
-	       name);
+	       "argument of %qE attribute is not %qs, %qs %qs, %qs, %qs, "
+	       "%qs, %qs, %qs, %qs or %qs", name,
+	       "reset", "software_exception", "page_miss", "timer0", "timer1",
+	       "message", "dma0", "dma1", "wand", "swi");
        *no_add_attrs = true;
        return NULL_TREE;
      }
@@ -1538,9 +1540,9 @@ static void
  epiphany_override_options (void)
  {
    if (epiphany_stack_offset < 4)
-    error ("stack_offset must be at least 4");
+    error ("%<stack_offset%> must be at least 4");
    if (epiphany_stack_offset & 3)
-    error ("stack_offset must be a multiple of 4");
+    error ("%<stack_offset%> must be a multiple of 4");
    epiphany_stack_offset = (epiphany_stack_offset + 3) & -4;
   if (!TARGET_SOFT_CMPSF)
     flag_finite_math_only = 1;
-- 
2.34.1


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

* Re: [PATCH] epiphany: fir -Wformat-diag.
  2022-01-12  9:57 [PATCH] epiphany: fir -Wformat-diag Martin Liška
@ 2022-01-12 16:21 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2022-01-12 16:21 UTC (permalink / raw)
  To: Martin Liška, gcc-patches; +Cc: gnu



On 1/12/2022 2:57 AM, Martin Liška wrote:
> This fixes -Wformat-diag warnings.
>
> Ready to be installed?
> Thanks,
> Martin
>
> gcc/ChangeLog:
>
>     * config/epiphany/epiphany.c (epiphany_handle_interrupt_attribute):
>     Use %qs format specifier.
>     (epiphany_override_options): Wrap keyword in %<, %>.
OK.  And similar changes for other ports are pre-approved.

jeff


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

end of thread, other threads:[~2022-01-12 16:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12  9:57 [PATCH] epiphany: fir -Wformat-diag Martin Liška
2022-01-12 16:21 ` Jeff Law

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