From 1c2a3aeee7dce83a9068f741162a6126a808de1d Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 22 Mar 2022 13:31:03 +0100 Subject: [PATCH] i386: update error message format. Use '%qs' instead of '(%qs)'. PR target/104898 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(-) diff --git a/gcc/config/i386/i386-options.cc b/gcc/config/i386/i386-options.cc index 805539364108..32cc58a764b3 100644 --- a/gcc/config/i386/i386-options.cc +++ b/gcc/config/i386/i386-options.cc @@ -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 % attribute"), + ? G_("bad value %qs for %<-march=%> switch") + : G_("bad value %qs for % attribute"), opts->x_ix86_arch_string); auto_vec 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 % attribute"), + ? G_("bad value %qs for %<-mtune=%> switch") + : G_("bad value %qs for % attribute"), opts->x_ix86_tune_string); auto_vec candidates; diff --git a/gcc/testsuite/gcc.target/i386/pr99753.c b/gcc/testsuite/gcc.target/i386/pr99753.c index 3def1fd7481a..1b000bd56b69 100644 --- a/gcc/testsuite/gcc.target/i386/pr99753.c +++ b/gcc/testsuite/gcc.target/i386/pr99753.c @@ -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 } */ diff --git a/gcc/testsuite/gcc.target/i386/spellcheck-options-1.c b/gcc/testsuite/gcc.target/i386/spellcheck-options-1.c index 275f86c178d6..a775545887ec 100644 --- a/gcc/testsuite/gcc.target/i386/spellcheck-options-1.c +++ b/gcc/testsuite/gcc.target/i386/spellcheck-options-1.c @@ -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 } */ diff --git a/gcc/testsuite/gcc.target/i386/spellcheck-options-2.c b/gcc/testsuite/gcc.target/i386/spellcheck-options-2.c index 848906245af6..91ddfe2cad25 100644 --- a/gcc/testsuite/gcc.target/i386/spellcheck-options-2.c +++ b/gcc/testsuite/gcc.target/i386/spellcheck-options-2.c @@ -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 } */ diff --git a/gcc/testsuite/gcc.target/i386/spellcheck-options-4.c b/gcc/testsuite/gcc.target/i386/spellcheck-options-4.c index 7eba41275139..71804a3d9b88 100644 --- a/gcc/testsuite/gcc.target/i386/spellcheck-options-4.c +++ b/gcc/testsuite/gcc.target/i386/spellcheck-options-4.c @@ -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 } */ -- 2.47.2