AUTOSAR C++14 Rule M3-2-4
An identifier with external linkage shall have exactly one definition
Description
This checker is deactivated in a default Polyspace® as You Code analysis. See Checkers Deactivated in Polyspace as You Code Analysis (Polyspace Access).
Rule Definition
An identifier with external linkage shall have exactly one definition.
Rationale
If an identifier has multiple definitions or no definitions, it can lead to undefined behavior.
Polyspace Implementation
The checker is not raised on unused code such as
Noninstantiated templates
Uncalled
static
functions orextern
functionsUncalled and undefined local functions
Unused types and variables
Troubleshooting
If you expect a rule violation but Polyspace does not report it, see Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
Group: Basic Concepts |
Category: Required, Automated |
Version History
Introduced in R2019a