False negatives for MISRA 9.3 missed for float array partial initialization

10 views (last 30 days)
Hello,
Initializing an array of float in the following way:
float array_a[10] = { 0.0 };
should raise the MISRA violation 9.3, that forbids partial array initialization. However the polyspace code prover is not detecting this
violation. Please confirm if this is a false negative or some other issue. Thanks in advance.
Related to the question here:

Accepted Answer

Christian Bard
Christian Bard on 10 Aug 2022
That is a specific Polyspace implementation of the rule 9.3. We have extended the exception 1 of the rule 9.3 with 0.0 and 0.0f.
  3 Comments
David Sosa
David Sosa on 11 Aug 2022
Edited: David Sosa on 11 Aug 2022
Ok. I understand the your rationale. Thanks for the detailed reply.

Sign in to comment.

More Answers (0)

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!