* [PATCH][pushed] s390x: Fix one more -Wformat-diag.
@ 2022-02-03 8:56 Martin Liška
2022-02-03 9:08 ` Jakub Jelinek
0 siblings, 1 reply; 3+ messages in thread
From: Martin Liška @ 2022-02-03 8:56 UTC (permalink / raw)
To: gcc-patches
gcc/ChangeLog:
* config/s390/s390.cc (s390_valid_target_attribute_inner_p):
Use the error message for i386 target.
---
gcc/config/s390/s390.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc
index 2db12d4ba4b..63b78ab16d8 100644
--- a/gcc/config/s390/s390.cc
+++ b/gcc/config/s390/s390.cc
@@ -15903,7 +15903,7 @@ s390_valid_target_attribute_inner_p (tree args,
/* Process the option. */
if (!found)
{
- error ("attribute(target(\"%s\")) is unknown", orig_p);
+ error ("attribute %qs argument %<target%> is unknown", orig_p);
return false;
}
else if (attrs[i].only_as_pragma && !force_pragma)
@@ -15953,7 +15953,7 @@ s390_valid_target_attribute_inner_p (tree args,
}
else
{
- error ("attribute(target(\"%s\")) is unknown", orig_p);
+ error ("attribute %qs argument %<target%> is unknown", orig_p);
ret = false;
}
}
@@ -15970,7 +15970,7 @@ s390_valid_target_attribute_inner_p (tree args,
global_dc);
else
{
- error ("attribute(target(\"%s\")) is unknown", orig_p);
+ error ("attribute %qs argument %<target%> is unknown", orig_p);
ret = false;
}
}
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][pushed] s390x: Fix one more -Wformat-diag.
2022-02-03 8:56 [PATCH][pushed] s390x: Fix one more -Wformat-diag Martin Liška
@ 2022-02-03 9:08 ` Jakub Jelinek
2022-02-03 9:12 ` Martin Liška
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2022-02-03 9:08 UTC (permalink / raw)
To: Martin Liška; +Cc: gcc-patches
On Thu, Feb 03, 2022 at 09:56:25AM +0100, Martin Liška wrote:
> gcc/ChangeLog:
>
> * config/s390/s390.cc (s390_valid_target_attribute_inner_p):
> Use the error message for i386 target.
> ---
> gcc/config/s390/s390.cc | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc
> index 2db12d4ba4b..63b78ab16d8 100644
> --- a/gcc/config/s390/s390.cc
> +++ b/gcc/config/s390/s390.cc
> @@ -15903,7 +15903,7 @@ s390_valid_target_attribute_inner_p (tree args,
> /* Process the option. */
> if (!found)
> {
> - error ("attribute(target(\"%s\")) is unknown", orig_p);
> + error ("attribute %qs argument %<target%> is unknown", orig_p);
This is backwards, isn't it? It should be
"attribute %<target%> argument %qs is unknown", no?
> return false;
> }
> else if (attrs[i].only_as_pragma && !force_pragma)
> @@ -15953,7 +15953,7 @@ s390_valid_target_attribute_inner_p (tree args,
> }
> else
> {
> - error ("attribute(target(\"%s\")) is unknown", orig_p);
> + error ("attribute %qs argument %<target%> is unknown", orig_p);
> ret = false;
> }
> }
> @@ -15970,7 +15970,7 @@ s390_valid_target_attribute_inner_p (tree args,
> global_dc);
> else
> {
> - error ("attribute(target(\"%s\")) is unknown", orig_p);
> + error ("attribute %qs argument %<target%> is unknown", orig_p);
> ret = false;
> }
> }
> --
> 2.34.1
Jakub
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][pushed] s390x: Fix one more -Wformat-diag.
2022-02-03 9:08 ` Jakub Jelinek
@ 2022-02-03 9:12 ` Martin Liška
0 siblings, 0 replies; 3+ messages in thread
From: Martin Liška @ 2022-02-03 9:12 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: gcc-patches
On 2/3/22 10:08, Jakub Jelinek wrote:
> This is backwards, isn't it? It should be
> "attribute %<target%> argument %qs is unknown", no?
Oh, correct:
cat x.c && gcc x.c -c
int __attribute__((target("-ff"))) foo() { }
x.c:1:36: error: attribute ‘-ff’ argument ‘target’ is unknown
1 | int __attribute__((target("-ff"))) foo() { }
| ^~~
Let me prepare a patch for both targets.
Martin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-03 9:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 8:56 [PATCH][pushed] s390x: Fix one more -Wformat-diag Martin Liška
2022-02-03 9:08 ` Jakub Jelinek
2022-02-03 9:12 ` Martin Liška
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).