Mail Archives: djgpp/1996/05/16/04:19:48
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.
- Raw text -