False negatives for MISRA 9.3 missed for float array partial initialization

조회 수: 8(최근 30일)
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:

채택된 답변

Christian Bard
Christian Bard 2022년 8월 10일
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
David Sosa
David Sosa 2022년 8월 11일
편집: David Sosa 2022년 8월 11일
Ok. I understand the your rationale. Thanks for the detailed reply.

댓글을 달려면 로그인하십시오.

추가 답변(0개)




Community Treasure Hunt

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

Start Hunting!

Translated by