Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 19.1 Example
#2
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

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


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)