TIOBE - C Coding Standard
|Synopsis:||Values shall not be implicitly converted to a narrower type.|
|Implicit conversions often escape inspections and have led to some extremely expensive failures, c.f. for example, (Hatton, 1994).
In some cases this highlights a previously unknown problem but in the majority of cases the assignment is intended as the programmer knows that the value is within the range of the smaller type. However, any implicit action is forbidden in favour of an explicit action which indicates clearly that the author intended this situation.
s = i; /* potential for information loss */
fl = db; /* potential for information loss */