I am looking for some open source tools that have specific 32 to 64 bit
code. The reason is that I am writing paper on porting 32 bit
applications to 64 bit. When Digital introduced the 64 bit Alpha chip in
the early 1990s, it modified lint by adding a specific mode to flag many
32 to 64 bit issues (I was the lint maintainer for the Alpha when
OSF1/Digital Uniux/Tru64 Unix was released). For instance, the following
code fragment:
long n;
int i = -2;
unsigned k = 1;
n = i + k;
On a 32 bit system, n == -1, but on a 64 bit system n == 4294967295.
This is because the expression (i + k) is an unsigned int expression,
and when assigned to n, the sign will not extend.
I'm looking for a tool or set of tools that might be able to find
anomalies like this to help programmers port their applications to 64
bits. Note that GCC will flag some issue, but not specific 32 to 64 bit
issues that are legal C or C++).
--
Jerry Feldman