arm: fix option quoting in error messages.

Message ID bd49f54a-9122-af74-36c2-2d50d906fc5d@suse.cz
State Committed
Headers
Series arm: fix option quoting in error messages. |

Commit Message

Martin Liška March 7, 2022, 10:27 a.m. UTC
  This fixes option quoting in error messages.

Ready to be installed?
Thanks,
Martin

	PR target/104794

gcc/ChangeLog:

	* config/arm/arm.cc (arm_option_override_internal): Fix quoting
	of options in error messages.
	(arm_option_reconfigure_globals): Likewise.
---
  gcc/config/arm/arm.cc | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
  

Comments

Kyrylo Tkachov March 7, 2022, 10:37 a.m. UTC | #1
> -----Original Message-----
> From: Gcc-patches <gcc-patches-
> bounces+kyrylo.tkachov=arm.com@gcc.gnu.org> On Behalf Of Martin Liška
> Sent: Monday, March 7, 2022 10:28 AM
> To: gcc-patches@gcc.gnu.org
> Cc: Christophe Lyon <christophe.lyon@linaro.org>
> Subject: [PATCH] arm: fix option quoting in error messages.
> 
> This fixes option quoting in error messages.
> 
> Ready to be installed?

Ok.
Thanks,
Kyrill

> Thanks,
> Martin
> 
> 	PR target/104794
> 
> gcc/ChangeLog:
> 
> 	* config/arm/arm.cc (arm_option_override_internal): Fix quoting
> 	of options in error messages.
> 	(arm_option_reconfigure_globals): Likewise.
> ---
>   gcc/config/arm/arm.cc | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
> index c1103d9fad6..4bf1ef0517d 100644
> --- a/gcc/config/arm/arm.cc
> +++ b/gcc/config/arm/arm.cc
> @@ -3185,8 +3185,8 @@ arm_option_override_internal (struct gcc_options
> *opts,
>     if (arm_stack_protector_guard == SSP_GLOBAL
>         && opts->x_arm_stack_protector_guard_offset_str)
>       {
> -      error ("incompatible options %'-mstack-protector-guard=global%' and"
> -	     "%'-mstack-protector-guard-offset=%qs%'",
> +      error ("incompatible options %<-mstack-protector-guard=global%> and"
> +	     "%<-mstack-protector-guard-offset=%s%>",
>   	     arm_stack_protector_guard_offset_str);
>       }
> 
> @@ -3880,7 +3880,7 @@ arm_option_reconfigure_globals (void)
>       }
> 
>     if (!TARGET_HARD_TP && arm_stack_protector_guard == SSP_TLSREG)
> -    error("%'-mstack-protector-guard=tls%' needs a hardware TLS register");
> +    error("%<-mstack-protector-guard=tls%> needs a hardware TLS register");
>   }
> 
>   /* Perform some validation between the desired architecture and the rest
> of the
> --
> 2.35.1
  
Richard Earnshaw March 7, 2022, 1:14 p.m. UTC | #2
On 07/03/2022 10:27, Martin Liška wrote:
> This fixes option quoting in error messages.
> 
> Ready to be installed?
> Thanks,
> Martin
> 
>      PR target/104794
> 
> gcc/ChangeLog:
> 
>      * config/arm/arm.cc (arm_option_override_internal): Fix quoting
>      of options in error messages.
>      (arm_option_reconfigure_globals): Likewise.
> ---
>   gcc/config/arm/arm.cc | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
> index c1103d9fad6..4bf1ef0517d 100644
> --- a/gcc/config/arm/arm.cc
> +++ b/gcc/config/arm/arm.cc
> @@ -3185,8 +3185,8 @@ arm_option_override_internal (struct gcc_options 
> *opts,
>     if (arm_stack_protector_guard == SSP_GLOBAL
>         && opts->x_arm_stack_protector_guard_offset_str)
>       {
> -      error ("incompatible options %'-mstack-protector-guard=global%' and"
> -         "%'-mstack-protector-guard-offset=%qs%'",
> +      error ("incompatible options %<-mstack-protector-guard=global%> and"
> +         "%<-mstack-protector-guard-offset=%s%>",

Wasn't the complaint also that there should be a space in the text 
between the 'and"' and the '"%<' on the subsequent line?

R.
>            arm_stack_protector_guard_offset_str);
>       }
> 
> @@ -3880,7 +3880,7 @@ arm_option_reconfigure_globals (void)
>       }
> 
>     if (!TARGET_HARD_TP && arm_stack_protector_guard == SSP_TLSREG)
> -    error("%'-mstack-protector-guard=tls%' needs a hardware TLS 
> register");
> +    error("%<-mstack-protector-guard=tls%> needs a hardware TLS 
> register");
>   }
> 
>   /* Perform some validation between the desired architecture and the 
> rest of the
  
Martin Liška March 7, 2022, 1:17 p.m. UTC | #3
On 3/7/22 14:14, Richard Earnshaw wrote:
> Wasn't the complaint also that there should be a space in the text between the 'and"' and the '"%<' on the subsequent line?

Yeah, I overlooked that.

I'm going to push the following patch.

Cheers,
Martin
  

Patch

diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
index c1103d9fad6..4bf1ef0517d 100644
--- a/gcc/config/arm/arm.cc
+++ b/gcc/config/arm/arm.cc
@@ -3185,8 +3185,8 @@  arm_option_override_internal (struct gcc_options *opts,
    if (arm_stack_protector_guard == SSP_GLOBAL
        && opts->x_arm_stack_protector_guard_offset_str)
      {
-      error ("incompatible options %'-mstack-protector-guard=global%' and"
-	     "%'-mstack-protector-guard-offset=%qs%'",
+      error ("incompatible options %<-mstack-protector-guard=global%> and"
+	     "%<-mstack-protector-guard-offset=%s%>",
  	     arm_stack_protector_guard_offset_str);
      }
  
@@ -3880,7 +3880,7 @@  arm_option_reconfigure_globals (void)
      }
  
    if (!TARGET_HARD_TP && arm_stack_protector_guard == SSP_TLSREG)
-    error("%'-mstack-protector-guard=tls%' needs a hardware TLS register");
+    error("%<-mstack-protector-guard=tls%> needs a hardware TLS register");
  }
  
  /* Perform some validation between the desired architecture and the rest of the