03-02-2014, 08:29 AM
Thank you for bringing this to our attention. You are correct to say that the line "a=b" is not a relevant example for this rule and there is no overlap between a and b.
The "*p = *q" is a correct example of exception 1, as would be the following
The "*p = *q" is a correct example of exception 1, as would be the following
Code:
union
{
int16_t i;
int32_t j;
int16_t k;
}a = {0};
a.i = a.k; /* Compliant - exception 1 */
Posted by and on behalf of the MISRA C Working Group