machine generated code and chatty compilers

Mike McNelly mike at hpfcso.HP.COM
Fri Jan 19 03:27:29 AEST 1990


> >I would argue that, in order to assure better quality code, human coders
> >should compile with warnings enabled.  I have yet to see a compiler
> >issue warnings that should not be investigated.
> 
> The problem is: once you *have* investigated the warnings, how do you
> get the compiler to *shut up* on an individual warning in future compiles?
> I don't want a global shut-up flag, even on a particular class of errors,
> because, in the course of modification, I still might make that class of
> error.  Lint does have some comment-directives to tell it to not flag
> individual instances of questionable code; ought not the compiler have the
> same feature?
> 
> ... 
> 
> Art Boyne, boyne at hplvla.hp.com

As a top-of-the-head suggestion, why don't you send the stderr to a file
and run a sed script on it to remove those errors you're no longer
interested in.  Telling the compiler to avoid warnings on specific line
numbers or specific conditions wouldn't be much easier and you'd stand a
fair chance that something useful might be unintentionally hidden.

Mike McNelly
mike at hpfcla



More information about the Comp.lang.c mailing list