The following is not issuing the '-Wfloat-equal' warning: (x + y) != 0.0f. If 0.0f is changed into 0, it's issued.
This seems to be somewhat related to https://bugs.llvm.org/show_bug.cgi?id=23717.
While I agree with the rationale presented in the previously linked ticket, comparing to zero after an operation is still potentially unsafe.
The following is not issuing the '-Wfloat-equal' warning:
(x + y) != 0.0f
. If0.0f
is changed into0
, it's issued. This seems to be somewhat related to https://bugs.llvm.org/show_bug.cgi?id=23717. While I agree with the rationale presented in the previously linked ticket, comparing to zero after an operation is still potentially unsafe.