Check for bitwise operations on signed integers
Check ID:
mathworks.misra.CompliantCGIRConstructions
Identify Simulink blocks that contain bitwise operations on signed integers.
Description
Following the recommendations of this check increases the likelihood of generating MISRA C:2012 compliant code for embedded applications, as well as code that complies with the CERT C and CWE standards.
Available with Embedded Coder® and Simulink® Check™.
Note
Stateflow® license is needed if the model contains Stateflow elements.
Results and Recommended Actions
Condition | Recommended Action |
---|---|
The model has blocks that contain bitwise operations on signed integers. | Consider using unsigned integers for bitwise operations. |
Capabilities and Limitations
You can:
The check assumes that code is generated for the whole model. When code is generated by a subsystem build or export functions, the check can produce incorrect results.
Exclude blocks and charts from this check if you have a Simulink Check license.
See Also
MISRA C:2012, Rule 10.1
CERT C, INT13-C
CWE, CWE-682
hisl_0060: Configuration parameters that improve MISRA C:2012 compliance
MISRA C (Embedded Coder)