donn@utah-gr.UUCP (Donn Seeley) (01/29/85)
From: shawn@mit-eddie.UUCP (Shawn McKay) I am looking for something to run over broken BSD software, that will aid me in finding [long identifier clashes]... [If the software is broken, then why are you stealing it?] Rather than write your own long-identifier detector or borrow some bug-ridden net.sources hack, I suggest you make use of a little-known and (when known) oft-ignored program named 'lint'. ------------------------------------------------------------------------ % cat problem.c main() { DonotUseLongIdentifiersOnSoftwareYouWishToShare(); DonotUseLongIdentifiersOnSoftwareYouWishToDistribute(); exit( 0 ); } DonotUseLongIdentifiersOnSoftwareYouWishToShare() { return; } DonotUseLongIdentifiersOnSoftwareYouWishToDistribute() { return; } % lint -hp problem.c problem.c: donotu multiply declared problem.c(9) :: problem.c(14) % ------------------------------------------------------------------------ Charter member of the Society for the Prevention of Cruelty to Software, Donn Seeley University of Utah CS Dept donn@utah-cs.arpa 40 46' 6"N 111 50' 34"W (801) 581-5668 decvax!utah-cs!donn
ksbszabo@wateng.UUCP (Kevin Szabo) (01/31/85)
In article <1321@utah-gr.UUCP> donn@utah-gr.UUCP (Donn Seeley) writes: > From: shawn@mit-eddie.UUCP (Shawn McKay) > I am looking for something to run over broken BSD software, > that will aid me in finding [long identifier clashes]... >Rather than write your own long-identifier detector or borrow some >bug-ridden net.sources hack, I suggest you make use of a little-known >and (when known) oft-ignored program named 'lint'. I would like to bring to your attention that LINT is often substandard at some institutions. The one we have on our Orcatech workstation croaks if filenames are longer the 13 chars! Yes, I know, bug the vender. Well I have ... with slow results. The only other option is to lint under BSD, unfortunately BSD lint gives you a choice of either a) flexnames OR b) 6 char case insensitive. I refuse to convolute my names any more than I have already had too (to create 7 char case sensitive), and thus the BSD lint was useless. Fortunately I had access to the source for LINT and could patch things up so that it would look for the fairly common 7 char externs. Also, multiply defined externals is handled differently by some compilers. For some reason our compiler & lint do not complain about the following piece of code: int nonunique; int nonunique; main() {;} Is there a reason for such behaviour? The V7 compiler I used to work with croaked in the loader phase with an incomprehensible error message when it had cases like these. Anyway, Hugh Redelmeier (hcrvx1!hugh) distributed CLASH a week or two ago. It should do what you need. Kevin (hopefully followups to this will go to net.lang.c) -- Kevin Szabo watmath!wateng!ksbszabo (U of Waterloo VLSI Group, Waterloo Ont.)