MISRA C:2012 Rule 8.14
The restrict type qualifier shall not be used
Description
Rule Definition
The restrict type qualifier shall not be used1 .
Rationale
When you use a restrict
qualifier carefully, it improves the efficiency of
code generated by a compiler. It can also improve static analysis. However, when
using the restrict
qualifier, it is difficult to make sure that
the memory areas operated on by two or more pointers do not overlap.
Polyspace Implementation
The rule checker flags all uses of the restrict
qualifier.
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: Declarations and Definitions |
Category: Required |
AGC Category: Advisory |
Version History
Introduced in R2014b
1 All MISRA coding rules and directives are © Copyright The MISRA Consortium Limited 2021.
The MISRA coding standards referenced in the Polyspace® Bug Finder™ documentation are from the following MISRA standards:
MISRA C:2004
MISRA C:2012
MISRA C:2023
MISRA C++:2008
MISRA C++:2023
MISRA and MISRA C are registered trademarks of The MISRA Consortium Limited 2021.