30-03-2017, 09:51 AM
The intent of the MISRA-C and MISRA-C++ rules is the same in this area, however C and C++ use different terminology.
C does not use the term "re-declaration" and "declarations" refers both the first and subsequent declarations.
The following is a C example where it is dangerous to have multiple declarations.The linker may fail to notice the type mismatch.
C does not use the term "re-declaration" and "declarations" refers both the first and subsequent declarations.
The following is a C example where it is dangerous to have multiple declarations.
Code:
File 1:
int n;
File 2
extern long n;
Posted by and on behalf of the MISRA C Working Group