![]() |
![]() |
0301 | ![]() |
||||
![]() | |||||||
| Implicitly undefined | REFERENCE - ISO:C90-6.3.4 Cast Operators - Semantics | ||||||
A cast has been performed from a pointer to object type to a floating type ( or vice versa ). This is meaningless. For example:
/*PRQA S 2017,3199,3203,3227,3408,3673 ++*/
extern void foo(float fta, int *pia)
{
float ftb;
int * pib;
ftb = (float)pia; /* Message 0301 */
pib = (int *)fta; /* Message 0301 */
}
MISRA-C:2004 Rules applicable to message 0301:
| Rule 1.2 (Required) | No reliance shall be placed on undefined or unspecified behaviour. |
| Rule 11.2 (Required) | Conversions shall not be performed between a pointer to object and any type other than an integral type, another pointer to object type or a pointer to void. |
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA-C:2004 Compliance Module 3.2 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |