views:

937

answers:

4

So I've read a few magazine articles and the website for Gimpel's PC-lint and Flexelint C/C++ compiler.

It's really expensive (at least for me), but it seems like it might have some merit to warrant the cost.

So I'm wondering if anyone else has used/bought them and can provide their opinions?

+7  A: 

I used to use PC-Lint a while ago. Personally I think it was worth the investment. Part of the answer to your question depends on a few other factors:

1.) Have you tried turning up the compiler warning level to the highest level? Very annoying but this has the effect of catching any obvious semantic errors. I'd do this before I invested in a specialized tool like PC-Lint

2.) Who are you coding for? If this is a homework assignment for school then it's not worth it. If it's software you're selling to others then it's a good investment in producing clean stable code.

Be aware that like any tool it can take some time to learn to use PC-Lint effectively.

Onorio Catenacci
A: 

I used Gimpel's lint and other products in 1985 and was an extremely happy customer. I had a part-time consulting gig and Gimpel's tools enabled me to deliver a more reliable component more quickly.

I don't know how the relative state of things has changed in 25 years. I'm amused to see that on Unix at least, Gimpel is still distributing obfuscated source code.

Norman Ramsey
A: 

This isn’t an answer to the question you asked, but if you’re considering one commercial static analysis tool, you probably should consider other companies’ static analysis tools as well. See, e.g., are-c-static-code-analyis-tools-worth-it?. And I’d suggest adding the “Static Analysis” tag to the question.

Flash Sheridan
A: 

I just finished adding Gimpel's PC-Lint to a build process. It's a difficult configuration, but it is definitely worth it. I worked for a few years in the past using this same linting tool on several different project. Static code checking tools help to check for all kinds of errors that a compiler will not check for, even if the compiler's warning are set to the highest (most strict) level.

Further, Gimpel's tool has support for MISRA (as well as specific rules for different version of ANSI C).

I agree with Onorio Catenacci, that if you are working on a homework assignment, it's not likely worth the cost. But if it's for a more robust build process, Lint will help you find errors earlier in the development cycle, and that makes it worthwhile.

Matt Van Kirk