public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-7758] aarch64: update error message format.
@ 2022-03-22 12:29 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-03-22 12:29 UTC (permalink / raw)
  To: gcc-cvs

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

commit r12-7758-gc6e75a4a353fe36920bac34b66fca4bfb71f7d91
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Mar 22 13:25:57 2022 +0100

    aarch64: update error message format.
    
    Use 'qs' and remove usage '(%qs)'.
    
            PR target/104898
    
    gcc/ChangeLog:
    
            * config/aarch64/aarch64.cc (aarch64_handle_attr_arch):
            Use 'qs' and remove usage '(%qs)'.
            (aarch64_handle_attr_cpu): Likewise.
            (aarch64_handle_attr_tune): Likewise.
            (aarch64_handle_attr_isa_flags): Likewise.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.target/aarch64/branch-protection-attr.c:
            Use 'qs' and remove usage '(%qs)'.
            * gcc.target/aarch64/spellcheck_1.c: Likewise.
            * gcc.target/aarch64/spellcheck_2.c: Likewise.
            * gcc.target/aarch64/spellcheck_3.c: Likewise.

Diff:
---
 gcc/config/aarch64/aarch64.cc                             | 14 +++++++-------
 gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c |  2 +-
 gcc/testsuite/gcc.target/aarch64/spellcheck_1.c           |  2 +-
 gcc/testsuite/gcc.target/aarch64/spellcheck_2.c           |  2 +-
 gcc/testsuite/gcc.target/aarch64/spellcheck_3.c           |  2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 903c842d65a..2f559600cff 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -18423,11 +18423,11 @@ aarch64_handle_attr_arch (const char *str)
 	error ("missing name in %<target(\"arch=\")%> pragma or attribute");
 	break;
       case AARCH64_PARSE_INVALID_ARG:
-	error ("invalid name (%qs) in %<target(\"arch=\")%> pragma or attribute", str);
+	error ("invalid name %qs in %<target(\"arch=\")%> pragma or attribute", str);
 	aarch64_print_hint_for_arch (str);
 	break;
       case AARCH64_PARSE_INVALID_FEATURE:
-	error ("invalid feature modifier %s of value (%qs) in "
+	error ("invalid feature modifier %s of value %qs in "
 	       "%<target()%> pragma or attribute", invalid_extension.c_str (), str);
 	aarch64_print_hint_for_extensions (invalid_extension);
 	break;
@@ -18465,11 +18465,11 @@ aarch64_handle_attr_cpu (const char *str)
 	error ("missing name in %<target(\"cpu=\")%> pragma or attribute");
 	break;
       case AARCH64_PARSE_INVALID_ARG:
-	error ("invalid name (%qs) in %<target(\"cpu=\")%> pragma or attribute", str);
+	error ("invalid name %qs in %<target(\"cpu=\")%> pragma or attribute", str);
 	aarch64_print_hint_for_core (str);
 	break;
       case AARCH64_PARSE_INVALID_FEATURE:
-	error ("invalid feature modifier %s of value (%qs) in "
+	error ("invalid feature modifier %qs of value %qs in "
 	       "%<target()%> pragma or attribute", invalid_extension.c_str (), str);
 	aarch64_print_hint_for_extensions (invalid_extension);
 	break;
@@ -18496,7 +18496,7 @@ aarch64_handle_attr_cpu (const char *str)
 	      " attribute");
        break;
      case AARCH64_PARSE_INVALID_ARG:
-       error ("invalid protection type (%qs) in %<target(\"branch-protection"
+       error ("invalid protection type %qs in %<target(\"branch-protection"
 	      "=\")%> pragma or attribute", err_str);
        break;
      case AARCH64_PARSE_OK:
@@ -18531,7 +18531,7 @@ aarch64_handle_attr_tune (const char *str)
   switch (parse_res)
     {
       case AARCH64_PARSE_INVALID_ARG:
-	error ("invalid name (%qs) in %<target(\"tune=\")%> pragma or attribute", str);
+	error ("invalid name %qs in %<target(\"tune=\")%> pragma or attribute", str);
 	aarch64_print_hint_for_core (str);
 	break;
       default:
@@ -18576,7 +18576,7 @@ aarch64_handle_attr_isa_flags (char *str)
 	break;
 
       case AARCH64_PARSE_INVALID_FEATURE:
-	error ("invalid feature modifier %s of value (%qs) in "
+	error ("invalid feature modifier %qs of value %qs in "
 	       "%<target()%> pragma or attribute", invalid_extension.c_str (), str);
 	break;
 
diff --git a/gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c b/gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c
index 1d6e55f3907..272000c2747 100644
--- a/gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c
+++ b/gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c
@@ -4,7 +4,7 @@ void __attribute__ ((target("branch-protection=leaf")))
 foo1 ()
 {
 }
-/* { dg-error {invalid protection type \('leaf'\) in 'target\("branch-protection="\)' pragma or attribute} "" { target *-*-* } 5 } */
+/* { dg-error {invalid protection type 'leaf' in 'target\("branch-protection="\)' pragma or attribute} "" { target *-*-* } 5 } */
 /* { dg-error {pragma or attribute 'target\("branch-protection=leaf"\)' is not valid} "" { target *-*-* } 5 } */
 
 void __attribute__ ((target("branch-protection=none+pac-ret")))
diff --git a/gcc/testsuite/gcc.target/aarch64/spellcheck_1.c b/gcc/testsuite/gcc.target/aarch64/spellcheck_1.c
index 8654674fc67..7f58be04bb1 100644
--- a/gcc/testsuite/gcc.target/aarch64/spellcheck_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/spellcheck_1.c
@@ -4,6 +4,6 @@ __attribute__((target ("arch=armv8-a-typo"))) void
 foo ()
 {
   /* { dg-message "valid arguments are: \[^\n\r]*(; did you mean 'armv*'?)?"  "" { target *-*-* } .-1 } */
-  /* { dg-error "invalid name \\('armv8-a-typo'\\) in 'target\\(\"arch=\"\\)' pragma or attribute"  "" { target *-*-* } .-2 } */
+  /* { dg-error "invalid name 'armv8-a-typo' in 'target\\(\"arch=\"\\)' pragma or attribute"  "" { target *-*-* } .-2 } */
   /* { dg-error "pragma or attribute 'target\\(\"arch=armv8-a-typo\"\\)' is not valid"  "" { target *-*-* } .-3 } */
 }
diff --git a/gcc/testsuite/gcc.target/aarch64/spellcheck_2.c b/gcc/testsuite/gcc.target/aarch64/spellcheck_2.c
index 1cc2c0591dc..83c8686c922 100644
--- a/gcc/testsuite/gcc.target/aarch64/spellcheck_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/spellcheck_2.c
@@ -4,6 +4,6 @@ __attribute__((target ("cpu=cortex-a57-typo"))) void
 foo ()
 {
   /* { dg-message "valid arguments are: \[^\n\r]*; did you mean 'cortex-a57'?"  "" { target *-*-* } .-1 } */
-  /* { dg-error "invalid name \\('cortex-a57-typo'\\) in 'target\\(\"cpu=\"\\)' pragma or attribute"  "" { target *-*-* } .-2 } */
+  /* { dg-error "invalid name 'cortex-a57-typo' in 'target\\(\"cpu=\"\\)' pragma or attribute"  "" { target *-*-* } .-2 } */
   /* { dg-error "pragma or attribute 'target\\(\"cpu=cortex-a57-typo\"\\)' is not valid"  "" { target *-*-* } .-3 } */
 }
diff --git a/gcc/testsuite/gcc.target/aarch64/spellcheck_3.c b/gcc/testsuite/gcc.target/aarch64/spellcheck_3.c
index 9953872b679..069c4211e48 100644
--- a/gcc/testsuite/gcc.target/aarch64/spellcheck_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/spellcheck_3.c
@@ -4,6 +4,6 @@ __attribute__((target ("tune=cortex-a57-typo"))) void
 foo ()
 {
   /* { dg-message "valid arguments are: \[^\n\r]*; did you mean 'cortex-a57'?"  "" { target *-*-* } .-1 } */
-  /* { dg-error "invalid name \\('cortex-a57-typo'\\) in 'target\\(\"tune=\"\\)' pragma or attribute"  "" { target *-*-* } .-2 } */
+  /* { dg-error "invalid name 'cortex-a57-typo' in 'target\\(\"tune=\"\\)' pragma or attribute"  "" { target *-*-* } .-2 } */
   /* { dg-error "pragma or attribute 'target\\(\"tune=cortex-a57-typo\"\\)' is not valid"  "" { target *-*-* } .-3 } */
 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-22 12:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 12:29 [gcc r12-7758] aarch64: update error message format 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).