Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 18.8 and clarification of "use" of VLA types
#2
Rule 18.8 applies to uses of VLA types. The intention of the MISRA-C working group is that "uses" include the places where the type is "used".
e.g.
  • Declaration of objects;
    typedef int32_t myVLA [x];
Code:
void foo(uint32_t sz,
         int32_t (*ary)[sz],   /* not compliant */
         int32_t val)
{
    (*ary)[0] = val;  /* not applicable to this rule */
}
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)