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

Manuel López-Ibáñez lopezibanez@gmail.com
Fri Nov 23 17:21:00 GMT 2007


On 23/11/2007, Joseph S. Myers <joseph@codesourcery.com> wrote:
> 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.

Please, Joseph, consider my recent email. Warning for user-provided
casts go against the idea of Wconversion.

Cheers,

Manuel.



More information about the Gcc-patches mailing list