This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix -Wconversion (PR c++/34198)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Manuel López-Ibáñez <manu at gcc dot gnu dot org>
- Date: Fri, 23 Nov 2007 13:31:53 +0000 (UTC)
- Subject: Re: [PATCH] Fix -Wconversion (PR c++/34198)
- References: <20071123120156.GE5451@devserv.devel.redhat.com>
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