2 lint questions

John Hascall hascall at atanasoff.cs.iastate.edu
Tue Aug 1 07:33:50 AEST 1989


In article <PAUL.89Jul31124616> paul at moncam.co.uk (Paul Hudson) writes:
>In article <18796 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
 
>   Lint would need to do call graph analysis to find these; I have never
>   seen one that does.
 
>Don't hold your breath - determining whether code is reachable is
>equivalent to the halting problem. Lint takes long enough already -
>infinite time seems a little over-the-top.

    Yes, but if you ignore conditionals (i.e., assume that all branches
    will be taken at some time) the problem of becomes much simpler--and
    I believe this is the problem the original poster has in mind.

    It parallels a check for variables declared but never used.

John Hascall



More information about the Comp.lang.c mailing list