David Brown <david.brown@xxxxxxxxxxxx> writes: >> David Brown<david@xxxxxxxxxxxxxxx> writes: >>> Making "-Wfloat-equal" a default flag would eliminate many of these >>> mistakes. >> >> It also results in false positives, so it shouldn't be on by default. >> >> [E.g. "float x = 0; .... y = x; ... if (y == 0) ..." should not result >> in a warning.] >> >> -Miles >> > > I gather (from the bug report mentioned by Vincent Lefevre) that code > like this will not always give the result you expect - so the compiler > should definitely warn in such cases. No. The bug cited by Vincent is a completely different case. Calculation and assignment are not the same. -Miles -- Quotation, n. The act of repeating erroneously the words of another. The words erroneously repeated.