473,750 Members | 2,186 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Looking for C++ Program Analyzers (eg, "lint for C++")

I lead a large C++ development project (the open-source portion of
which can be found here: <http://svn.cleversafe. org/dscore/>), and I'm
interested in leveraging C++ "Program Analyzers" to detect problematic
code and to help condition my development team to proactively avoid
pitfalls that these tools hopefully expose.

Does anyone have any product recommendations based upon their
experience?

More details:

I see this article by Scott Meyers and Martin Klaus that appears to be
about 10 years old:

http://www.aristeia.com/ddjpaper1.html

And I wonder: what's the current state of the art?

The article above doesn't speak highly of "g++ -Wall" (which we are
currently using); maybe it's gotten better in 10 years?

Are the following tools (which I reference from the above article) or
anything else still significantly "better" than g++?

http://www.parasoft.com/jsp/products...product=Wizard
http://www.ics.com/products/centerli...ter/index.html
http://www.gimpel.com/html/lintfaq.htm
http://www.abxsoft.com/codchk.htm
http://www.programmingresearch.com/QACPP_FAMILY.htm

Specifically, I will be looking for people's experience describing
tools/products that caught real problems instead of just spewing a
bunch of errors/suggestions that end up just being busy work and not
squashing any bugs. Alas, I expect some "busy work," but I do want to
proactively kill bugs/solve problems, as well.

Thanks in advance for any help,
-Matt
Dispersed Storage: http://cleversafe.org
Remove the "downwithspamme rs-" text to email me.
Dec 1 '06 #1
5 1859
On Thu, 30 Nov 2006 20:55:53 -0600, I wrote:
>I'm interested in leveraging C++ "Program Analyzers" to detect problematic
code and to help condition my development team to proactively avoid
pitfalls that these tools hopefully expose.
Does anyone have any product recommendations based upon their
experience?
More details can be found here:

http://cleversafe.org/forums/viewtopic.php?t=1285

-Matt
Dispersed Storage: http://cleversafe.org
Remove the "downwithspamme rs-" text to email me.
Dec 1 '06 #2
On Thu, 30 Nov 2006 20:55:53 -0600, Matt England
<ma**@downwiths pammers-mengland.netwro te:
>I lead a large C++ development project (the open-source portion of
which can be found here: <http://svn.cleversafe. org/dscore/>), and I'm
interested in leveraging C++ "Program Analyzers" to detect problematic
code and to help condition my development team to proactively avoid
pitfalls that these tools hopefully expose.

Does anyone have any product recommendations based upon their
experience?
<...>>
>Specifically , I will be looking for people's experience describing
tools/products that caught real problems instead of just spewing a
bunch of errors/suggestions that end up just being busy work and not
squashing any bugs. Alas, I expect some "busy work," but I do want to
proactively kill bugs/solve problems, as well.
I am using pc-lint (www.gimpel.com) and I am happy with it. It has
located for me some errors the compiler would not complain of.
Zara
Dec 1 '06 #3

Matt England wrote:
I lead a large C++ development project (the open-source portion of
which can be found here: <http://svn.cleversafe. org/dscore/>), and I'm
interested in leveraging C++ "Program Analyzers" to detect problematic
code and to help condition my development team to proactively avoid
pitfalls that these tools hopefully expose.
In our little project (www.ultimatepp.org) there is semi-heuristic C++
parser and it was used by one of our users (Sandor Hojtsy) to implement
small GUI utility for his company that parses through C++ sources and
computes the metric to detect "overcomplicate d" loops and methods.

The source code for the utility can be found here:

http://www.ultimatepp. org/examples$CodeMe tric.html

for your convenience, I have placed compiled binary here:

http://www.ultimatepp.org/download/CodeMetric.zip

Maybe it will be of any use for you.

Mirek

Dec 1 '06 #4
Zara wrote:
I am using pc-lint (www.gimpel.com) and I am happy with it. It has
located for me some errors the compiler would not complain of.
My company also uses it, and it is valuable. For instance, I had
something like this in some multithreaded code:

boost::mutex mutex;

void Foo()
{
boost::mutex::s coped_lock( mutex );
// Do protected, single-threaded stuff here
}

Of course the first line in the function should have been something
like:

boost::mutex::s coped_lock lock( mutex );

so that the lock existed through the duration of the function. The
compiler didn't complain about it (nor did my brain), but thankfully
PC-Lint did.

On the other hand, there are a number of problems with the PC-Lint, as
the forum at Gimpel.com proves. In particular, it not infrequently
generates spurious messages that take time (and sometimes support from
Gimpel) to ferret out. Still, I have not used anything better.

Cheers! --M

Dec 1 '06 #5

mlimber wrote:
Zara wrote:
I am using pc-lint (www.gimpel.com) and I am happy with it. It has
located for me some errors the compiler would not complain of.

My company also uses it, and it is valuable. For instance, I had
something like this in some multithreaded code:

boost::mutex mutex;

void Foo()
{
boost::mutex::s coped_lock( mutex );
// Do protected, single-threaded stuff here
}

Of course the first line in the function should have been something
like:

boost::mutex::s coped_lock lock( mutex );
Little bit off-topic, but I have done this error so many times that I
rather ended with macro

void Foo() {
INTERLOCKED {
// Do protected stuff here...
}
}

Mirek

Dec 1 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5053
by: Jason Brown | last post by:
I've been looking for a script that will create a real-time list of 'top referrers', similar to the links to sites you see on the left of the page at http://www.linkswarm.com. They also have a page http://www.linkswarm.com/referrers/referrers.php which shows all referrers. I'm assuming you'd be able to set filters. There is no signup required, you just link to the site and your site appears in the referrers list, but as a webmaster, you...
0
1926
by: blockhead | last post by:
We are looking for someone to either complete a php forum program or create one for us. There isn't really anything that is available that suits our needs and we have specific wants. If you are interested, we can supply you a link to our unfinished program to see if you could finish it or take a look at it and our current forum program to see what we are looking for and possibly give us a quote. We have an unfinished forum program....
17
4008
by: los | last post by:
Hi, I'm trying to create a program similar to that of Google's desktop that will crawl through the hard drive and index files. I have written the program and as of now I just put the thread to sleep for 1 second after indexing a couple of files. I'm wondering if anyone knows of a way that I could make so that the program will run at full speed only runs after the computer has been idle for a while. I've looked at the "nice" command...
12
1656
by: Charles Law | last post by:
Hi guys A bit of curve ball here ... I have a document (Word) that contains a series of instructions in sections and subsections (and sub-subsections). There are 350 pages of them. I need to translate these instructions into something that can be processed automatically, so I have used the Command pattern to set up a set of commands that correspond to the various instructions in the document.
3
1532
by: Sea Squid | last post by:
My task is to write a C++ program to satisfy these requirements. I have an embedded board which is supposed to output 2 channels of 10-bit, 40MHz datastreams. My board has an ARM cpu and an USB2 port. The data is stored in the PC in plain text. Can C++ and USB2 port satisfy my requirement? Thanks.
3
996
by: darjonase | last post by:
I am looking for some way to analyze the timing of my code. I have placed some elapsed time functions in various methods, but my code is still running slow and I want to find the biggest culprits of this. I know of the tools stated here before, such as Visual Studio Analyzer and DevPartner, but DevPartner is far too expensive and I can't find any type of downloadable installer for VSA. One post that I read mentioned that there were other...
12
2401
by: amogan | last post by:
**If interested & qualified, please reply with your resume directly to amogan@google.com** Referrals are always welcome!! Network System Test Engineer - Mountain View This position is available in Mountain View, CA.
32
2566
by: jhc0033 | last post by:
Interesting article I came across on Slashdot: http://developers.slashdot.org/developers/08/07/10/213211.shtml They are using C at JPL to program Mars Lander and just about everything now! Not Ada. Anyone got an explanation? I wonder also, do they really mean C++ when they say C. In my experience, this is a frequent, although disagreeable usage.
0
8999
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8836
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9394
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6803
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4885
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3322
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.