When performing an implicit from float to bool, the floating point value must be *exactly* zero in order for the conversion to result in 0. This does not involve a conversion through an integer value, and so truncation of the value is not performed. This patch addresses this by using the floating-point value when determining whether to print "true" or "false" in the diagnostic. The behavior of the codegen has always been correct, so this only modifies the wording of the diagnostic to be accurate.
This patch address PR25876.
What about
? Arguably any float -> bool conversion changes the value (because true and false are not values of type float), so it wouldn't be completely unreasonable to warn even if the literal is 0.0.