From: "A.Appleyard" Organization: Materials Science Centre To: DJGPP AT delorie DOT com Date: Thu, 16 May 1996 14:49:24 GMT Subject: Re: Unused functions Message-ID: <32D086403B@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. ... Eli Zaretskii replied (Subject: Re: Unused functions):- > Then how about just grep'ping through the sources? You could create a file > with the names of all the functions defined by your program then call fgrep > to search for these names. If all you find for a certain function is just > its declaration and definition, that function is not used. ... Not so easy with user-declared operators, which I use a lot of. I still say that what is needed is a djgpp linker option to complain about entry points (1) unused, (2) of external type but only used in that file. > GCC has a switch that causes it to output a list of all the functions > declared by a source file. (Finding that switch in the GCC docs is left as > an exercise to the interested readers ;-). But please what is that switch? P.S. to Eli: 1-6 March 1996 I was scuba diving in the Red Sea (on the Sea Surveyor), 18 dives in 6 days, infinity fish everywhere.