[PATCH] Fix -Wconversion (PR c++/34198)

Joseph S. Myers joseph@codesourcery.com
Fri Nov 23 15:49:00 GMT 2007


On Fri, 23 Nov 2007, Jakub Jelinek wrote:

> 2007-11-23  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR c++/34198
> 	* c-common.c (conversion_warning): For INTEGER_TYPE to
> 	INTEGER_TYPE conversions call get_narrower on expr to avoid
> 	spurious warnings from binop shortening or when the implicit
> 	conversion can't change the value.
> 
> 	* gcc.dg/Wconversion-5.c: New test.
> 	* g++.dg/Wconversion3.C: New test.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list