Wish: Variable Not Used Warning

Markus Koskimies markus at reaaliaika.net
Thu Jul 10 14:07:23 PDT 2008


On Thu, 10 Jul 2008 14:55:49 -0400, Nick Sabalausky wrote:

> I'm not sure I see the need for as many as four warning levels (though I
> suppose I could be convinced given an appropriate argument), but
> something like this sounds ideal to me:
> 
> - enable typically-useful warnings
> - enable anally-retentive, only sometimes-helpful, warnings
> 
> - treat typically-useful warnings as errors - treat all warnings as
> errors

What I think is that the basic compiler needs following:

- A set of warnings, that usually indicate bugs in the code and are 
relatively easy to circumvent (like unused vars and such), but which may 
be looked to be at least some sort frequent things while sketching 
software

- Basically two warning levels: either to generate code while there are 
warnings, or not generate code (treating them errors)

Suppressing the output of warnings? Why? What use? If you are not going 
to correct the warnings in your code when completing it, why you then 
even read the output of the compiler (if the code is generated)? Closing 
eyes does not make the things behind the warnings to go away :)

Then, when dealing with larger software and looking for good places for 
refactoring, there could be an external "anally-retentive" lint-like 
tool :)



More information about the Digitalmars-d mailing list