![]() |
|
MISRA-C:2004 Rule 11.2: (Required) |
|
||||
![]() | |||||||
Example Code:
/* PRQA S 2982,3203 ++ */
#include "misra.h"
#include "m2cmex.h"
extern S16 test_1102( void )
{
F32 * pf32 = 0;
void * pv = 0;
f32a = ( F32 )pf32; /* MISRA Violation */
f64a = ( F64 )pf32; /* MISRA Violation */
f32a = ( F32 )pv; /* MISRA Violation */
f64a = ( F64 )pv; /* MISRA Violation */
return 0;
}
QAC messages that encompass this guideline:
| 0301 | [u] Cast between a pointer to object and a floating type. |
Related rules:
| Rule 1.2 | No reliance shall be placed on undefined or unspecified behaviour. |
|
||
(c) The Motor Industry Research Association, 2004
|
QA C Source Code Analyser 8.1.2
MISRA-C:2004 Compliance Module 3.2 © 2013 Programming Research www.programmingresearch.com |
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |