[PATCH] D64666: [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss

Ziang Wan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 22 16:12:06 PDT 2019


ziangwan added a comment.

In D64666#1596512 <https://reviews.llvm.org/D64666#1596512>, @xbolva00 wrote:

> @jfb’s comment is not addressed yet.
>
> In D64666#1583629 <https://reviews.llvm.org/D64666#1583629>, @jfb wrote:
>
> > I think you want to default-ignore the "may lose precision" warnings, but not the ones that you know always lose precision.
>


In GCC, the int type -> float type conversion warning is disabled by default. When the user uses `-Wconversion` or `-Wimplicit-float-conversion`, both "definitely lose" warning and "may lose" warning are issued. The current patch works the same way as GCC.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64666/new/

https://reviews.llvm.org/D64666





More information about the cfe-commits mailing list