lint/C code checks

simonh@swidev.demon.co.uk (Simon Huntington)
Thu, 1 Jul 1993 10:05:54 GMT

          From comp.compilers

Related articles
lint/C code checks simonh@swidev.demon.co.uk (1993-07-01)
| List of all articles for this month |
Newsgroups: comp.compilers
From: simonh@swidev.demon.co.uk (Simon Huntington)
Keywords: C, lint, question
Organization: SoftWare Interrupt Developments
Date: Thu, 1 Jul 1993 10:05:54 GMT

Is there a copy of lint available via anonymous FTP? I'm looking for checks
to perform in a C/C++ compiler; lint seems like a good start.


What other warnings do C compilers generally issue for dodgy expressions? I
know of the following sort of things:


if (x = 1) // probably should be ==
if (x==1 & y==1) // probably should be &&, not & (same for |/||)
if (x<<y + 2) // is x << (y+2), not (x<<y) + 2


Any suggestions via email or details of FTP'able documents/sources would be
very much appreciated.
--
Simon Huntington
Software Interrupt Developments. Leeds, UK.
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.