MISRA C:2023 Dir 4.6
typedefs
that indicate size and signedness
should be used in place of the basic numerical types
Since R2024a
Description
Directive Definition
typedefs
that indicate size and
signedness should be used in place of the basic numerical types.
Rationale
When the amount of memory being allocated is important, using specific-length types makes it clear how much storage is being reserved for each object.
Polyspace Implementation
The rule checker flags use of basic data types in variable or function
declarations and definitions. The rule enforces use of typedef
s
instead.
The rule checker does not flag the use of basic types in the typedef
statements themselves.
Troubleshooting
If you expect a rule violation but do not see it, refer to Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
Group: Code design |
Category: Advisory |
AGC Category: Advisory |
Version History
Introduced in R2024a