16-04-2018, 09:23 AM
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.
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