Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 5.2 : confusion
#3
Rule 5.2 only applies to identifiers in inner scopes. It is unclear from the example whether the code in 2.c and 3.c exists at file scope or within a function.

If "struct con tmp_ev" in 2.c and 3.c appears within a function definition there will be a violation of rule 5.2.

If "struct con tmp_ev" appears at file scope, there is a violation of rule 8.9 as there are two (tentative) definitions of "struct con tmp_ev" in the project.
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)