08-06-2018, 07:40 AM
For clarification, the issue addressed by rule 5.1 is not the length of the external identifiers, but the number of significant characters in the identifier.
Even though you have found a compiler/linker with no obvious limit, this does not mean that other compiler/linkers do not have a limit. The gcc documentation states
"For external names, the number of significant characters are defined by the linker; for almost all targets, all characters are significant."
You will never violate rule 5.1 if your compiler/linker has no limit on the significant characters since the amplification for rule 5.1 states
Even though you have found a compiler/linker with no obvious limit, this does not mean that other compiler/linkers do not have a limit. The gcc documentation states
"For external names, the number of significant characters are defined by the linker; for almost all targets, all characters are significant."
You will never violate rule 5.1 if your compiler/linker has no limit on the significant characters since the amplification for rule 5.1 states
Quote: This rule requires that different external identifiers be distinct within the limits imposed by the implementation
Posted by and on behalf of the MISRA C Working Group