On 5/9/2016 5:21 AM, Ethan Watson wrote:
I'd assume in the first case that the float is being promoted to double for the
comparison. Is there already a warning for loss of precision?

Promoting to double does not lose precision.

We treat warnings
as errors in our C++ code, so C4244 triggers all the time in MSVC with integer
operations. I just tested that float initialisation in MSVC, initialising a
float with a double triggers C4305.

That's going quite a bit further.

Reply via email to