public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] rs6000: Adjust error messages.
@ 2022-03-23 10:31 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2022-03-23 10:31 UTC (permalink / raw)
  To: gcc-patches; +Cc: segher

gcc/ChangeLog:

	* config/rs6000/rs6000-c.cc (altivec_resolve_overloaded_builtin):
	Use %qs in format.
	* config/rs6000/rs6000.cc (rs6000_option_override_internal):
	Reword the error message.
---
 gcc/config/rs6000/rs6000-c.cc | 5 +++--
 gcc/config/rs6000/rs6000.cc   | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc
index ad976753a3c..2f0f4fe337d 100644
--- a/gcc/config/rs6000/rs6000-c.cc
+++ b/gcc/config/rs6000/rs6000-c.cc
@@ -1788,8 +1788,9 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
 	{
 	  if (TYPE_READONLY (TREE_TYPE (type))
 	      && !TYPE_READONLY (TREE_TYPE (decl_type)))
-	    warning (0, "passing argument %d of %qE discards %<const%> "
-		     "qualifier from pointer target type", n + 1, fndecl);
+	    warning (0, "passing argument %d of %qE discards %qs "
+		     "qualifier from pointer target type", n + 1, fndecl,
+		     "const");
 	  type = build_qualified_type (TREE_TYPE (type), 0);
 	  type = build_pointer_type (type);
 	  arg = fold_convert (type, arg);
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index a7645820b1e..53c70b82529 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -4345,8 +4345,8 @@ rs6000_option_override_internal (bool global_init_p)
 	    rs6000_veclib_handler = rs6000_builtin_vectorized_libmass;
 	  else
 	    {
-	      error ("unknown vectorization library ABI type %qs for "
-		     "%qs switch", rs6000_veclibabi_name, "-mveclibabi=");
+	      error ("unknown vectorization library type in "
+		     "%<-mveclibabi=%s%>", rs6000_veclibabi_name);
 	      ret = false;
 	    }
 	}
-- 
2.35.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rs6000: Adjust error messages.
       [not found] <202203231033.22NAXRWD013233@gate.crashing.org>
@ 2022-03-23 11:17 ` Segher Boessenkool
  0 siblings, 0 replies; 4+ messages in thread
From: Segher Boessenkool @ 2022-03-23 11:17 UTC (permalink / raw)
  To: Martin Liska; +Cc: gcc-patches

On Wed, Mar 23, 2022 at 11:31:12AM +0100, Martin Liska wrote:
> --- a/gcc/config/rs6000/rs6000.cc
> +++ b/gcc/config/rs6000/rs6000.cc
> @@ -4345,8 +4345,8 @@ rs6000_option_override_internal (bool global_init_p)
>  	    rs6000_veclib_handler = rs6000_builtin_vectorized_libmass;
>  	  else
>  	    {
> -	      error ("unknown vectorization library ABI type %qs for "
> -		     "%qs switch", rs6000_veclibabi_name, "-mveclibabi=");
> +	      error ("unknown vectorization library type in "
> +		     "%<-mveclibabi=%s%>", rs6000_veclibabi_name);

"ABI type".

Okay for trunk with that restored.  Thanks!


Segher

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] rs6000: Adjust error messages.
@ 2022-03-23 10:31 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2022-03-23 10:31 UTC (permalink / raw)
  To: gcc-patches; +Cc: segher

gcc/ChangeLog:

	* config/rs6000/rs6000-c.cc (altivec_resolve_overloaded_builtin):
	Use %qs in format.
	* config/rs6000/rs6000.cc (rs6000_option_override_internal):
	Reword the error message.
---
 gcc/config/rs6000/rs6000-c.cc | 5 +++--
 gcc/config/rs6000/rs6000.cc   | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc
index ad976753a3c..2f0f4fe337d 100644
--- a/gcc/config/rs6000/rs6000-c.cc
+++ b/gcc/config/rs6000/rs6000-c.cc
@@ -1788,8 +1788,9 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
 	{
 	  if (TYPE_READONLY (TREE_TYPE (type))
 	      && !TYPE_READONLY (TREE_TYPE (decl_type)))
-	    warning (0, "passing argument %d of %qE discards %<const%> "
-		     "qualifier from pointer target type", n + 1, fndecl);
+	    warning (0, "passing argument %d of %qE discards %qs "
+		     "qualifier from pointer target type", n + 1, fndecl,
+		     "const");
 	  type = build_qualified_type (TREE_TYPE (type), 0);
 	  type = build_pointer_type (type);
 	  arg = fold_convert (type, arg);
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index a7645820b1e..53c70b82529 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -4345,8 +4345,8 @@ rs6000_option_override_internal (bool global_init_p)
 	    rs6000_veclib_handler = rs6000_builtin_vectorized_libmass;
 	  else
 	    {
-	      error ("unknown vectorization library ABI type %qs for "
-		     "%qs switch", rs6000_veclibabi_name, "-mveclibabi=");
+	      error ("unknown vectorization library type in "
+		     "%<-mveclibabi=%s%>", rs6000_veclibabi_name);
 	      ret = false;
 	    }
 	}
-- 
2.35.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] rs6000: Adjust error messages.
@ 2022-03-23 10:31 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2022-03-23 10:31 UTC (permalink / raw)
  To: gcc-patches; +Cc: segher

gcc/ChangeLog:

	* config/rs6000/rs6000-c.cc (altivec_resolve_overloaded_builtin):
	Use %qs in format.
	* config/rs6000/rs6000.cc (rs6000_option_override_internal):
	Reword the error message.
---
 gcc/config/rs6000/rs6000-c.cc | 5 +++--
 gcc/config/rs6000/rs6000.cc   | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc
index ad976753a3c..2f0f4fe337d 100644
--- a/gcc/config/rs6000/rs6000-c.cc
+++ b/gcc/config/rs6000/rs6000-c.cc
@@ -1788,8 +1788,9 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
 	{
 	  if (TYPE_READONLY (TREE_TYPE (type))
 	      && !TYPE_READONLY (TREE_TYPE (decl_type)))
-	    warning (0, "passing argument %d of %qE discards %<const%> "
-		     "qualifier from pointer target type", n + 1, fndecl);
+	    warning (0, "passing argument %d of %qE discards %qs "
+		     "qualifier from pointer target type", n + 1, fndecl,
+		     "const");
 	  type = build_qualified_type (TREE_TYPE (type), 0);
 	  type = build_pointer_type (type);
 	  arg = fold_convert (type, arg);
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index a7645820b1e..53c70b82529 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -4345,8 +4345,8 @@ rs6000_option_override_internal (bool global_init_p)
 	    rs6000_veclib_handler = rs6000_builtin_vectorized_libmass;
 	  else
 	    {
-	      error ("unknown vectorization library ABI type %qs for "
-		     "%qs switch", rs6000_veclibabi_name, "-mveclibabi=");
+	      error ("unknown vectorization library type in "
+		     "%<-mveclibabi=%s%>", rs6000_veclibabi_name);
 	      ret = false;
 	    }
 	}
-- 
2.35.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-23 11:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23 10:31 [PATCH] rs6000: Adjust error messages Martin Liska
2022-03-23 10:31 Martin Liska
2022-03-23 10:31 Martin Liska
     [not found] <202203231033.22NAXRWD013233@gate.crashing.org>
2022-03-23 11:17 ` Segher Boessenkool

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).