![]() |
![]() |
0275 | ![]() |
||||
![]() | |||||||
| 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 */
MISRA C:2012 Rules applicable to message 0275:
| Rule-1.3 (Required) | There shall be no occurrence of undefined or critical unspecified behaviour |
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index | Contents |