views:

204

answers:

3

Possible Duplicate:
What open source C++ static analysis tools are available?

Which open-source static C++ (not just C) code analysis tools are most suitable for porting code to 64-bit platforms?

A: 

If you use visual studio, there is a switch "detect 64 bit portability issues".

If you use gcc compile with -Wall -Wextra -Wpedantic then it should also inform you about portability issues.

You can also use splint (C only) and so on. There are lots of such tools.

There are also commercial ones for C++ (from wikipedia):

* Green Hills Software DoubleCheck — static analysis for C and C++ code.
* LDRA Testbed — A software analysis and testing tool suite for C & C++.
* PC-Lint — A software analysis tool for C & C++.
* QA-C (and QA-C++) — deep static analysis of C for quality assurance and guideline enforcement.
* Red Lizard's Goanna — Static analysis for C/C++ in Eclipse and Visual Studio.
* BEAM — IBM Checking Tool for Bugs Errors and Mistakes
codymanix
Splint is C only
Suma
+1 @suma If anyone can find a C++ equivalent, I would like to know (and I have trawled for years, so do not expect to be surprised)
LeonixSolutions
A: 

I was looking for something like this because of LARGEADDRESSAWARE.

As far as I know, there is no such open source tool available. There is Cppcheck, but compared to commercial tools it offers only very few checks, and none of them seems to be 64b related.

To some extent you can use your compiler built-in functionality ("detect 64 bit portability issues" for Visual Studio, -Wall -Wextra -Wpedantic for gcc). If you want deeper analysis, commerical PC lint or PVS-Studio Code Analyzer are probably the best known.

Other questions dealing with the same subject:

Suma
+1  A: 

We use cppcheck. I'm not sure how much it applies to 64-bit, but perhaps it's worth taking a look at.

rioch