public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] rs6000: wrap const in an error message.
@ 2022-03-22 12:50 Martin Liška
  2022-03-22 12:50 ` Martin Liška
  2022-03-22 15:08 ` Segher Boessenkool
  0 siblings, 2 replies; 3+ messages in thread
From: Martin Liška @ 2022-03-22 12:50 UTC (permalink / raw)
  To: gcc-patches

Pushed as obvious.

Martin

	PR target/104903

gcc/ChangeLog:

	* config/rs6000/rs6000-c.cc (altivec_resolve_overloaded_builtin):
	Wrap const keyword.
---
  gcc/config/rs6000/rs6000-c.cc | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc
index 3b62b499df2..f73b98f8051 100644
--- a/gcc/config/rs6000/rs6000-c.cc
+++ b/gcc/config/rs6000/rs6000-c.cc
@@ -1788,8 +1788,8 @@ 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 %<const%>  "
+		     "qualifier from pointer target type", n + 1, fndecl);
  	  type = build_qualified_type (TREE_TYPE (type), 0);
  	  type = build_pointer_type (type);
  	  arg = fold_convert (type, arg);
-- 
2.35.1


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

* Re: [PATCH] rs6000: wrap const in an error message.
  2022-03-22 12:50 [PATCH] rs6000: wrap const in an error message Martin Liška
@ 2022-03-22 12:50 ` Martin Liška
  2022-03-22 15:08 ` Segher Boessenkool
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Liška @ 2022-03-22 12:50 UTC (permalink / raw)
  To: gcc-patches

On 3/22/22 13:50, Martin Liška wrote:
> +        warning (0, "passing argument %d of %qE discards %<const%>  "

I've just installed version only with one space. Sorry for noise.

Martin

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

* Re: [PATCH] rs6000: wrap const in an error message.
  2022-03-22 12:50 [PATCH] rs6000: wrap const in an error message Martin Liška
  2022-03-22 12:50 ` Martin Liška
@ 2022-03-22 15:08 ` Segher Boessenkool
  1 sibling, 0 replies; 3+ messages in thread
From: Segher Boessenkool @ 2022-03-22 15:08 UTC (permalink / raw)
  To: Martin Liška; +Cc: gcc-patches

On Tue, Mar 22, 2022 at 01:50:09PM +0100, Martin Liška wrote:
> Pushed as obvious.

> -	    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 %<const%>  "
> +		     "qualifier from pointer target type", n + 1, fndecl);

Please use %qs instead?


Segher

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

end of thread, other threads:[~2022-03-22 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 12:50 [PATCH] rs6000: wrap const in an error message Martin Liška
2022-03-22 12:50 ` Martin Liška
2022-03-22 15:08 ` 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).