diff mbox series

[C++] Remove trailing space from diagnostics for narrowing conv (PR translation/90011)

Message ID 20190409070955.GJ21066@tucnak
State New
Headers show
Series [C++] Remove trailing space from diagnostics for narrowing conv (PR translation/90011) | expand

Commit Message

Jakub Jelinek April 9, 2019, 7:09 a.m. UTC
Hi!

In r263523 check_narrowing changed in this spot:
 	  pedwarn (loc, OPT_Wnarrowing,
-		   "narrowing conversion of %qE from %qH to %qI "
-		   "inside { }", init, ftype, type);
+		   "narrowing conversion of %qE from %qH to %qI ",
+		   init, ftype, type);
where the trailing space on one line was desirable before to separate
%qI from inside { }, but now it doesn't make sense.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2019-04-09  Jakub Jelinek  <jakub@redhat.com>

	PR translation/90011
	* typeck2.c (check_narrowing): Remove trailing space from diagnostics.


	Jakub

Comments

Marek Polacek April 9, 2019, 1:17 p.m. UTC | #1
On Tue, Apr 09, 2019 at 09:09:55AM +0200, Jakub Jelinek wrote:
> Hi!
> 
> In r263523 check_narrowing changed in this spot:
>  	  pedwarn (loc, OPT_Wnarrowing,
> -		   "narrowing conversion of %qE from %qH to %qI "
> -		   "inside { }", init, ftype, type);
> +		   "narrowing conversion of %qE from %qH to %qI ",
> +		   init, ftype, type);
> where the trailing space on one line was desirable before to separate
> %qI from inside { }, but now it doesn't make sense.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> 2019-04-09  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR translation/90011
> 	* typeck2.c (check_narrowing): Remove trailing space from diagnostics.

I think this is obvious :).

Marek
diff mbox series

Patch

--- gcc/cp/typeck2.c.jj	2019-04-08 10:11:28.199226055 +0200
+++ gcc/cp/typeck2.c	2019-04-08 21:09:56.082464190 +0200
@@ -1019,7 +1019,7 @@  check_narrowing (tree type, tree init, t
 	  int savederrorcount = errorcount;
 	  global_dc->pedantic_errors = 1;
 	  pedwarn (loc, OPT_Wnarrowing,
-		   "narrowing conversion of %qE from %qH to %qI ",
+		   "narrowing conversion of %qE from %qH to %qI",
 		   init, ftype, type);
 	  if (errorcount == savederrorcount)
 	    ok = true;