using lint on `commercial' code
Chris Torek
chris at umcp-cs.UUCP
Mon May 5 14:51:18 AEST 1986
In article <531 at bu-cs.UUCP> bzs at bu-cs.UUCP (Barry Shein) writes:
>A more interesting idea: Would it be reasonable to run a vendor's
>code you just bought through LINT and call their warranty dept if
>there was any serious bitching by lint?
The answer to that depends on the purpose for which the software
was sold (and bought). In practice I suspect this would be entirely
unproductive: You would spend all your time on the phone, and
never have a chance to use the software. . . .
Anecdote: We had some Imagen software that was working on a Vax.
We moved the software to a Pyramid and it broke. I ran lint on
the program in question. Among the several hundred lines of other
errors, it pointed out the one that was causing the failure:
struct foo {
int i;
} foo[128];
caller()
{
...
callee(foo[n]);
...
}
callee(i)
int i;
{
/* do something with i */
}
This works on most machines; since the structure contains no `holes',
one member of that structure is the same size as one integer, and
the two can be treated as equivalent. But the Pyramid has a register
window architecture, and passes `simple' arguments in registers,
reserving the data stack for `complex' arguments---such as (drum
roll please) structures.
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1415)
UUCP: seismo!umcp-cs!chris
CSNet: chris at umcp-cs ARPA: chris at mimsy.umd.edu
More information about the Comp.lang.c
mailing list