MISRAC++2023-6.2.3_a
In this section:
Synopsis
(Required) The source code used to implement an entity shall appear only once
Enabled by default
Yes
Severity/Certainty
Medium/Medium

Full description
Duplicate implementation of an entity found. This check is identical to MISRAC2004-8.9, MISRAC2012-Rule-8.6, MISRAC++2008-3-2-4.
This is a link analysis check.
Coding standards
- MISRA C:2004 8.9
(Required) An identifier with external linkage shall have exactly one external definition.
- MISRA C:2012 Rule-8.6
(Required) An identifier with external linkage shall have exactly one external definition
- MISRA C++ 2008 3-2-4
(Required) An identifier with external linkage shall have exactly one definition.
Code examples
The following code example fails the check and will give a warning:
void example(void) {}
The following code example passes the check and will not give a warning about this issue:
void example(void) {}