lint for ppc / gcc / RTEMS?
C. M. Heard/VVNET, Inc.
heard@vvnet.com
Mon Mar 17 11:08:00 GMT 1997
On Mon, 17 Mar 1997 Joel Sherrill <joel@merlin.gcs.redstone.army.mil> wrote:
>
> On Thu, 13 Mar 1997, Dom Latter wrote:
>
> > As above: I've decided to throw lint at our code to see what comes
> > out. However, there seem to be a number of versions out there.
> >
> > Perhaps one is more suitable than the others for our environment:
> > gcc hosted on Linux building code for PowerPC / RTEMS.
> >
> > In any case I'm having a tough time actually finding a downloadable
> > binary / script / whatever.
>
> gcc -Wall is pretty good at picking up most things traditional lint
> does. There is a free lint program on the net however (lclint?) which
> appeared to try to do even more. I have not tried it myself.
Another point to consider: if you generate optimised code (-O2 or -O3)
then gcc's flow analysis will warn you of uninitialised variables, exiting
from a non-void function without returning a value, and several other
suspicious run-time conditions which no version of lint that I am aware
of can pick up. (Personally, I find traditional lint to be much too noisy,
whereas I _always_ pay attention to any warnings from gcc -Wall -O3. I tend
to think of lint as an anachronism to be avoided, given what a well-designed
compiler can do, but I'm sure there are many who will disagree ...)
Mike
--
C. M. Heard
VVNET, Inc. phone: +1 408 247 9376
4040 Moorpark Ave. Suite 206 fax: +1 408 244 3651
San Jose, CA 95117 USA e-mail: heard@vvnet.com
More information about the crossgcc
mailing list