Several float to int potential rounding errors/inconsistencies

Linus Torvalds torvalds at linux-foundation.org
Mon Mar 6 20:27:07 PST 2017


On Mon, Mar 6, 2017 at 8:23 PM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> I'd love to have some way to automatically find the places where we do
> that "implicit cast from FP to int without proper rounding", but I
> don't know of any such tool (sparse could be modified to do it, but
> doesn't do C++).

Hmm. I guess there's "-Wfloat-conversion". It might cause excessive
warnings. I'll try.

                 Linus


More information about the subsurface mailing list