Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!agate!usenet.ins.cwru.edu!eagle!bach.lerc.nasa.gov!fsset From: fsset@bach.lerc.nasa.gov (Scott E. Townsend) Newsgroups: comp.lang.fortran Subject: Re: A Question of Style Message-ID: <1991May22.124219.28296@eagle.lerc.nasa.gov> Date: 22 May 91 12:42:19 GMT Article-I.D.: eagle.1991May22.124219.28296 References: <12306@uwm.edu> <713@curly.appmag.com> Sender: news@eagle.lerc.nasa.gov Organization: Nasa Lewis Research Center ( Cleveland ) Lines: 43 In article <713@curly.appmag.com> pa@appmag.com (Pierre Asselin) writes: >In article <12306@uwm.edu> jgd@uwm.edu writes: >> >>I have recently run into a FORTRAN compiler that exhibits, to my >>mind, an annoying trait. It complains voiciferously about statement >>numbers that are defined on statements, but are otherwise unreferenced. >>[...] >>* Is this trait good or bad? Desirable or undesirable? > >Good because, should you want to find unreferenced lines and clean up >your code, a compiler can do it much better than you. > >>* Is the inability to suppress this specific message good or bad? > >ABOMINABLE. Ruins the whole thing. Better it weren't there at all. >As you pointed out, the "spurious" labels could be referenced in >explanatory comments. > Just a note for those trying to get rid of messages like these (my pet peeve is lint -- a similar problem) As long as you're on a UNIX-like system, and the errors get routed to stdout try something like this: f77 flags files whatever | \ sed -e "/spurious-message-1-text/d" \ -e "/spurious-message-2-text/d" I'm no FORTRAN guru, but this technique works great for lint & similar programs which don't allow you to turn off 'spurious' messages. (I don't know how many '-e' expressions sed allows, but I've used up to four int the past, and they can be regular expressions!) Of course this does nothing for the compiler's exit status, a bother if you're in a makefile. -- ------------------------------------------------------------------------ Scott Townsend | Mail Stop: 5-11 NASA Lewis Research Center | Email: fsset@bach.lerc.nasa.gov Cleveland, Ohio 44135 |