Main Content

Check integer word lengths

Check ID: mathworks.misra.IntegerWordLengths

Identify integer word lengths that do not comply with hardware implementation settings


The check flags integers whose word lengths exceed the number of bits permitted via the hardware implementation settings.

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™.


Stateflow® license is needed if the model contains Stateflow elements.

Results and Recommended Actions

ConditionRecommended Action

Model object contains integer word lengths that are not compliant with hardware implementation settings.

Update the integer so its length does not exceed the permitted number of bits. You can view the permitted number of bits in the Configuration Parameters dialog box, on the Hardware Implementation > Device details pane.

Capabilities and Limitations

You can:

  • Exclude blocks and charts from this check if you have a Simulink Check license.

See Also