MISRA Discussion Forums

Full Version: 5.8 and external identifiers in different header file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Would the following examples be non-compliant with rule #5.8?
Code:
/* file 1. h */
extern int32_t count;    
extern void foo(void);

/* file 2.h */
extern int32_t count;   // here
extern void zoo(void);
Both declarations of count are of the same object and therefore rule 5.8 does not apply.
However rule 8.5 will be violated as the declaration appears in more than one file.