Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
5.8 and external identifiers in different header file
#1
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);
<t></t>
Reply
#2
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.
Posted by and on behalf of the MISRA C Working Group
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)