开发者

Has anybody built a C-file for verifying the code-checking tools for MISRA-2004?

We are using PC-Lint for code-checking our sources for compliance with MISRA-2004. As this is a safety-relevant project and we're heading for a certificate by TUV, we need to show pr开发者_如何转开发oof for our confidence in the tool (they don't accept anything like "I used it many times").

Our aim is to have a complete set of negative tests, checking the tool for each rule of the MISRA-2004 set by breaking it and forcing an error or warning by the tool.

Has anybody already done this and are you willing to share your result/C-code?


I am not aware of any comprehensive test suites for MISRA compliance but you can download the MISRA "Exemplar Suite" from MISRA's website. You need to register (which is free) and then you can download the suite in the "MISRA C Resources" section. The suite is not exhuastive but it contains a lot of examples and is a good starting point for creating your own tests.


Not sure what it's worth in your case, but I know Gimpel has compliance charts for both MISRA 1998 and 2004. These charts list the rules, state whether Lint can verify rule compliance or not, and provide a comment illustrating why or how.

If you are interested, you can find it here for MISRA:2004. There's a version for MISRA 1998 as well.


There is one good tool for that - QA-C MISRA

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜