From: nikki AT gameboutique DOT co (nikki) Newsgroups: comp.os.msdos.djgpp Subject: Re: fwd: Re: A program to find all unused symbols in a C program Date: 28 Feb 1997 23:25:24 GMT Organization: GameBoutique Ltd. Lines: 26 Message-ID: <5f7ph4$7hi@flex.uunet.pipex.com> References: <199702282149 DOT QAA16603 AT delorie DOT com> NNTP-Posting-Host: www.gameboutique.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp >>linkage is internal to that file. You can't reference it in another >>file. >> >>In other words, it's _not_ global across files if you do this. > > Isn't that what's wanted? When you try to link, you'll get an error > saying that the link whatever can't be found - now you KNOW that that > variable was accessed (else it wouldn't generate an error). indeed that was my point. before actually 'finishing' with any program one of the last things i do is remove all debug code and excess crap that tends to accumlate while programming. the best way to deal with excess variables i find is make all the global ones static and compile - if a variables wasn't accessed at all it will tell you about it :) yes obviously the code won't work, but then you remove the static part again after you've removed the dead wood ;) it just struck me as easier i suppose that's all. probably depends how you structure the programs and such though. if you have 546646 globals it wouldn't be a fun job i suspect ;) regards, nik -- Graham Tootell nikki AT gameboutique DOT com