[previous] 0275 [next] [U] Floating value is out of range for conversion to destination type.
Explicitly undefined REFERENCE - ISO:C90-6.2.1.3 Conversions (Floating and Integral)

When a floating value is converted to an integral type which is unable to represent the integral part, the results are undefined.

For example:


/*PRQA S 1269,2017,3121,3211,3408,3602 ++*/

signed char x = (signed char)200.35;    /* Message 275 */
signed int  y = (signed int)1.0E20;     /* Message 275 */
unsigned int z = (unsigned int)-2.5;    /* Message 275 */

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents