MISRA.CONV.NUM.NARROWERImplicit numeric conversion to narrower type. MISRA-C++ Rule 5-0-6 (required): An implicit integral or floating-point conversion shall not reduce the size of the underlying type.[Undefined 4.9(1)] RationaleAn implicit conversion that results in the size of a type being reduced may result in a loss of information. Examplevoid f ( ) { int32_t s32; int16_t s16; s16 = s32; // Non-compliant s16 = static_cast< int16_t > ( s32 ); // Compliant } |