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: [4.3] wcoercion (3): conversion_warnings for C / C++


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.



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