static analysis tools for C++

  • Follow


Hi,

I am looking at using some static analysis tools for programming in C+
+. I'm already using PC-Lint and I am happy with it and its value for
money (around $300). There are a few things that could be better,
which I can summarize as: its underlying technology is not that
sophisticated (for example, its interprocedural analysis is poor) and
its a great tool for C, but for C++ it can do a much better job (for
features like templates and EH for example)...

What are the other static analysis tools that are available? I am
looking for a static analysis tool that points out my mistakes early
and I don't mind lots of false positives. Tools like Coverity Prevent
find runtime problems at compile-time which is good, but I am looking
for tools that show my programming mistakes, portability, conformance
problems etc (the tools that do symbolic execution like Prevent are
not meant for this purpose). I see that EDG based compilers provide
good warnings/remarks, but is there any commercial static analysis
tool that uses EDG frontend and provides more features/warnings?

Unfortunately, except for simple tools like splint for C, there aren't
any good opensource/freeware software for C++ that I know. I don't
mind paying reasonable amount, so commercial tools are fine for me.

Thanks in advance for your help.

Cheers
Ganesh


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Reply sgganesh (28) 11/6/2007 1:53:27 PM

Ganny schrieb:
> Hi,
> 
> I am looking at using some static analysis tools for programming in C+
> +. I'm already using PC-Lint and I am happy with it and its value for
> money (around $300). There are a few things that could be better,
> which I can summarize as: its underlying technology is not that
> sophisticated (for example, its interprocedural analysis is poor) and
> its a great tool for C, but for C++ it can do a much better job (for
> features like templates and EH for example)...
> 
> What are the other static analysis tools that are available? I am
> looking for a static analysis tool that points out my mistakes early
> and I don't mind lots of false positives. Tools like Coverity Prevent
> find runtime problems at compile-time which is good, but I am looking
> for tools that show my programming mistakes, portability, conformance
> problems etc (the tools that do symbolic execution like Prevent are
> not meant for this purpose). I see that EDG based compilers provide
> good warnings/remarks, but is there any commercial static analysis
> tool that uses EDG frontend and provides more features/warnings?
> 
> Unfortunately, except for simple tools like splint for C, there aren't
> any good opensource/freeware software for C++ that I know. I don't
> mind paying reasonable amount, so commercial tools are fine for me.
> 
> Thanks in advance for your help.
> 
> Cheers
> Ganesh
> 
> 

Hi,

you may have a look at the latest Intel Compiler it has a build-in
static verifier and a code coverage tool as part of the PGO optimizer.

Cheers

-- Mario

-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Reply __Mario__ 11/6/2007 6:44:01 PM


On Tue,  6 Nov 2007 13:53:27 CST, Ganny wrote:
[...]
> not meant for this purpose). I see that EDG based compilers provide
> good warnings/remarks, but is there any commercial static analysis
> tool that uses EDG frontend and provides more features/warnings?

There is HP's Code Advisor (see http://www.hp.com/go/cadvise) which does
some static analysis, but don't expect too much.

BTW, if you don't happen to use HP-UX and aCC, you can try it on HP's
Test Drive (see http://www.testdrive.hp.com)


Christof

-- 
http://cmeerw.org                              sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org                   xmpp:cmeerw at cmeerw.org

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Reply Christof 11/7/2007 4:14:21 AM

> What are the other static analysis tools that are available? I am
> looking for a static analysis tool that points out my mistakes early
> and I don't mind lots of false positives.

Try the GNU C++ compiler (g++) with the warnings cranked up to the
highest setting. There is also an option to watch out for violations
of Scott Meyers  50 items in Effective C++ (e.g it checks that members
are initialised in the order they are declared).

Regards,

Andrew Marlow


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Reply apm35 11/7/2007 4:44:32 PM

On Nov 6, 11:53 am, Ganny <sggan...@gmail.com> wrote:
> I am looking at using some static analysis tools for programming in C++

Coverity seems to have made a lot of investment in their product:

http://www.coverity.com/html/prod_iden_defects_c.html

Regards,
Ivan Novick
http://www.0x4849.net


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Reply Ivan 11/8/2007 3:02:01 AM

4 Replies
163 Views

(page loaded in 0.066 seconds)

Similiar Articles:













7/24/2012 6:33:18 PM


Reply: