This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]