3

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 proof 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?

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
B.S.
  • 31
  • 1
  • Good luck trying to get PC-lint "qualified". Which standard are you aiming for qualification against (IEC 61508, IEC 26262, DO-178 etc) – Andrew Apr 08 '21 at 10:31

3 Answers3

2

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.

Robert Gamble
  • 106,424
  • 25
  • 145
  • 137
1

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.

Johan Bezem
  • 2,582
  • 1
  • 20
  • 47
0

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