Main Content

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

ConditionRecommended 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