i386: update error message format.
Commit Message
Pushed to master as obvious.
Use '%qs' instead of '(%qs)'.
gcc/ChangeLog:
* config/i386/i386-options.cc (ix86_option_override_internal):
Use '%qs' instead of '(%qs)'.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr99753.c: Update test.
* gcc.target/i386/spellcheck-options-1.c: Likewise.
* gcc.target/i386/spellcheck-options-2.c: Likewise.
* gcc.target/i386/spellcheck-options-4.c: Likewise.
---
gcc/config/i386/i386-options.cc | 8 ++++----
gcc/testsuite/gcc.target/i386/pr99753.c | 2 +-
gcc/testsuite/gcc.target/i386/spellcheck-options-1.c | 2 +-
gcc/testsuite/gcc.target/i386/spellcheck-options-2.c | 2 +-
gcc/testsuite/gcc.target/i386/spellcheck-options-4.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
@@ -2212,8 +2212,8 @@ ix86_option_override_internal (bool main_args_p,
if (i == pta_size)
{
error (main_args_p
- ? G_("bad value (%qs) for %<-march=%> switch")
- : G_("bad value (%qs) for %<target(\"arch=\")%> attribute"),
+ ? G_("bad value %qs for %<-march=%> switch")
+ : G_("bad value %qs for %<target(\"arch=\")%> attribute"),
opts->x_ix86_arch_string);
auto_vec <const char *> candidates;
@@ -2292,8 +2292,8 @@ ix86_option_override_internal (bool main_args_p,
if (ix86_tune_specified && i == pta_size)
{
error (main_args_p
- ? G_("bad value (%qs) for %<-mtune=%> switch")
- : G_("bad value (%qs) for %<target(\"tune=\")%> attribute"),
+ ? G_("bad value %qs for %<-mtune=%> switch")
+ : G_("bad value %qs for %<target(\"tune=\")%> attribute"),
opts->x_ix86_tune_string);
auto_vec <const char *> candidates;
@@ -2,4 +2,4 @@
/* { dg-do compile } */
/* { dg-options "-march=amd -m32" } */
-/* { dg-error "bad value .'amd'. for '-march=' switch" "" { target *-*-* } 0 } */
+/* { dg-error "bad value 'amd' for '-march=' switch" "" { target *-*-* } 0 } */
@@ -3,5 +3,5 @@
/* { dg-do compile } */
/* { dg-options "-march=hasvel" } */
-/* { dg-error "bad value .'hasvel'. for '-march=' switch" "" { target *-*-* } 0 } */
+/* { dg-error "bad value 'hasvel' for '-march=' switch" "" { target *-*-* } 0 } */
/* { dg-message "valid arguments to '-march=' switch are: \[^\n\r]*; did you mean 'haswell'?" "" { target *-*-* } 0 } */
@@ -3,5 +3,5 @@
/* { dg-do compile } */
/* { dg-options "-mtune=hasvel" } */
-/* { dg-error "bad value .'hasvel'. for '-mtune=' switch" "" { target *-*-* } 0 } */
+/* { dg-error "bad value 'hasvel' for '-mtune=' switch" "" { target *-*-* } 0 } */
/* { dg-message "valid arguments to '-mtune=' switch are: \[^\n\r]*; did you mean 'haswell'?" "" { target *-*-* } 0 } */
@@ -3,5 +3,5 @@
/* { dg-do compile } */
-__attribute__((target ("arch=hasvel"))) void foo (void) {} /* { dg-error "bad value .'hasvel'. for 'target..arch=..' attribute" } */
+__attribute__((target ("arch=hasvel"))) void foo (void) {} /* { dg-error "bad value 'hasvel' for 'target..arch=..' attribute" } */
/* { dg-message "valid arguments to 'target..arch=..' attribute are: \[^\n\r]*; did you mean 'haswell'?" "" { target *-*-* } .-1 } */