Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!sharkey!atanasoff!hascall From: hascall@atanasoff.cs.iastate.edu (John Hascall) Newsgroups: comp.lang.c Subject: Re: 2 lint questions Message-ID: <1282@atanasoff.cs.iastate.edu> Date: 31 Jul 89 21:33:50 GMT References: <5967@ingr.com> <18796@mimsy.UUCP> Reply-To: hascall@atanasoff.cs.iastate.edu.UUCP (John Hascall) Organization: Iowa State Univ. Computation Center Lines: 17 In article paul@moncam.co.uk (Paul Hudson) writes: >In article <18796@mimsy.UUCP> chris@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