According to Section 6.2.7 of C99:
All declarations that refer to the same object or function shall have compatible type; otherwise, the behavior is undefined.
...
Further, according to 6.4.2.1, paragraph 6:
Any identifiers that differ in a significant character are different identifiers. If two identifiers differ only in nonsignificant characters, the behavior is undefined.
...
- 63 significant initial characters in an internal identifier or a macro name (each Each universal character name or extended source character is considered a single character.)
- 31 significant initial characters in an external identifier (each Each universal character name specifying a short identifier of 0000FFFF or less is considered 6 characters, ; each universal character name specifying a short identifier of 00010000 or more is considered 10 characters, ; and each extended source character, if any exist, is considered the same number of characters as the corresponding universal character name, if any.)
Restriction of the significance of an external name to fewer than 255 characters in the standard (considering each universal character name or extended source character as a single character) is an obsolescent feature that is a concession to existing implementations. As a result, it is not necessary to comply with this restriction as long as the identifiers are unique and the assumptions concerning the number of significant characters are documented.
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Bibliography
Related Guidelines
\[[ISO/IEC 9899:1999|AA. Bibliography#ISO/IEC 9899-1999]\] Section 5.2.4.1, "Translation limits"
\[[Wiki Markup
ISO/IEC PDTR 24772|AA. Bibliography#ISO/IEC PDTR 24772]\] TR 24772 "AJN Choice of Filenames and Other External Identifiers" and "YOW Identifier name reuse" \[[MISRA 2004|AA. Bibliography#MISRA 04]\] Rules
MISRA Rules 5.1 and 8.9
Bibliography
...
02. Declarations and Initialization (DCL) DCL33-C. Ensure that restrict-qualified source and destination pointers in function arguments do not reference overlapping objects