From: "A.Appleyard" Organization: Materials Science Centre To: DJGPP AT DELORIE DOT COM Date: Thu, 16 May 1996 09:07:27 GMT Subject: Re: Unused functions Message-ID: <2D1D787C03@fs2.mt.umist.ac.uk> A.Appleyard wrote wanting djgpp's linker to be able to say which entry points are (1) only used within the same file, so he can declare them `static', (2) not used at all, so he can delete them. dj AT delorie DOT com (DJ Delorie) replied:- > Most code falls into one of two categories: > 1. Part of a library. Manually split the code into many sources once, and > every user benefits. > 2. Part of an application. Hey, you're going to use them all anyway or you > wouldn't have written them, right? Re (2), big applications (like a text editor called AAEMACS that I wrote in Gnu C++) get altered and re-altered and unused matter is bound to accumulate. -Wall shows unused variables within a function, and that is very useful; but how to easily find unused functions and unused global-level declarations? Dividing the source form into infinity tiny files is too fiddly and awkward.