I am not sure if many of you are aware of what the Misra C 2004 standards are but rule 11.2 states
Rule 11.2 (required) Conversions shall not be performed between a pointer to object and any other than an integral type, another pointer to object type or a pointer to void.
I am looking for opinions of what you think this actually means!
for example this would be a violation
however would the below code be a violation?Code:float *x; long y; x=&y; /*Violation*/
It produces a compiler warning using Dev C++ but the Misra rule seems to state that it is ok to convert between integral types.Code:long *x; int y; x=&y; /*Violation*/
I hope I have been clear enough!