16-10-2006, 06:54 AM
With rule 11.2,
\"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\"
my understanding of the term
\"another pointer to object type\"
is, that for example code like
int* Source;
long* Target;
Target = (long*)Source;
doesn't violate this rule (but at least violates rule 11.4);
but our misra checker tool's interpretation of this rule is more like
\"another pointer to same object type\"
therefore it emits a misra violation for code structures like the one mentioned above.
To help me out, could you please tell me which interpretation is right?
Thanks in advance,
elmar
\"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\"
my understanding of the term
\"another pointer to object type\"
is, that for example code like
int* Source;
long* Target;
Target = (long*)Source;
doesn't violate this rule (but at least violates rule 11.4);
but our misra checker tool's interpretation of this rule is more like
\"another pointer to same object type\"
therefore it emits a misra violation for code structures like the one mentioned above.
To help me out, could you please tell me which interpretation is right?
Thanks in advance,
elmar