Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!pasteur!ames!amdahl!pacbell!att!cbnewsc!tjr From: tjr@cbnewsc.ATT.COM (thomas.j.roberts) Newsgroups: comp.lang.c Subject: Re: machine generated code and chatty compilers Message-ID: <12848@cbnewsc.ATT.COM> Date: 15 Jan 90 15:19:24 GMT References: <1477@mdbs.UUCP> Organization: AT&T Bell Laboratories Lines: 35 From article <1477@mdbs.UUCP>, by wsmith@mdbs.UUCP (Bill Smith): > In article <923@thor.wright.EDU>, econrad@thor.wright.edu (Eric Conrad) writes: >> From article <1471@mdbs.UUCP>, by wsmith@mdbs.UUCP (Bill Smith): >> So turn the warning suppression flag on for automatic-generated code. > > How do you decide which subset of the warning messages to suppress? > > To suppress all warnings may hide useful and pertinent warning but > different programming groups may all have mutually disjoint definitions > of "pertinent warnings." > > Lint suffers from this effect too. You can't tweak it to omit just the set > of errors that you don't care to see. > Maybe YOU can't, but many of us can (i.e. those of us using UNIX). On UNIX, if this really becomes an issue, simply pipe the output of lint into a suitably-crafted grep command which will remove all unwanted warnings. While this may not be the most optimal solution, it would surely be good enough for most uses. A better solution is to design the automatic code generator to avoid outputting "lousy" code. That is the approach I have always taken. Also: look at TURBO C, for MS-DOS. It has an extensive set of flags to enable/disable each individual class of warning messages. As MS-DOS is limited to a 127 character command line, TURBO C has an initialization file used for command options. I have never used this feature, as I always rework my code (or code generator) until no warning or error messages are generated. Tom Roberts AT&T Bell Laboratories att!ihnet!tjr