AUTOSAR C++14 Rule M3-2-1
All declarations of an object or function shall have compatible types
Description
Rule Definition
All declarations of an object or function shall have compatible types.
Rationale
If the declarations of an object or function in two different translation units have incompatible types, the behavior is undefined.
Polyspace Implementation
Polyspace® considers two types to be compatible if they have the same size and signedness in the environment that you use. The checker is not raised on unused code such as
Noninstantiated templates
Uncalled
static
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