to add a new warning to find use of an explicite cast from real to unsigned int.
Although an explicite cast looks like the programmer knew, the intended behaviour may need two casts.
I wanted to "infinitely" accumulate possibly small, possibly negative increments (float i) in a modulo counter consisting of an unsigned integer variable (uint32_t n) and a real variable (float f) for the fractional part.
f += i;
n += (uint32t)f; // should read n += (uint32t)(int32t)f;
f -= (int32t)f;
worked with several compilers for PC platforms (gcc, lcc32, VS C++) and with TI''s c6000 compiler for an OMAP L138, but the counter failed to decrease with TI's ARM5.1 compiler for the 7R4 core.
This is implementation defined behaviour as of C99 22.214.171.124, but none of the compilers emitted a warning nor does lint.