01-04-2015, 11:51 AM
Rule 2.5 is marked as having a "system" analysis scope. Rule 2.5 is only violated if the macro is used in none of the files in the system.
In Case1, the system only includes File1.c and does not use "abc". This is a violation of rule 2.5.
In Case2, the system contains both File1.c and File2.c. Since "abc" is used in one the files, there are no violations of rule 2.5.
In Case1, the system only includes File1.c and does not use "abc". This is a violation of rule 2.5.
In Case2, the system contains both File1.c and File2.c. Since "abc" is used in one the files, there are no violations of rule 2.5.
Posted by and on behalf of the MISRA C Working Group