[4.3] wcoercion (3): conversion_warnings for C / C++

Manuel López-Ibáñez lopezibanez@gmail.com
Wed Nov 15 17:57:00 GMT 2006


On 15/11/06, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Sun, 5 Nov 2006, Manuel Lopez-Ibanez wrote:
>
> > This patch adds most of the new functionality of Wconversion: warn for
> > implicit
> > conversions that may alter a value. This includes conversions between
> > real and integer, like abs (x) when x is double; conversions between
> > signed and unsigned, like unsigned ui = -1; and conversions to smaller
> > types, like sqrtf (M_PI). Do not warn for explicit casts like abs
> > ((int) x) and ui = (unsigned) -1, or if the value is not changed by
> > the conversion like abs (2.0).
>
> This is OK.
>
> Do you warn for potentially value-changing conversions between binary and
> decimal floating point types, or is that covered by another patch or
> another testcase?
>

That is covered by an incoming patch.



More information about the Gcc-patches mailing list