bearophile wrote:
On the other hand, in a hairy C program of mine I have defined a counter
variable, and then I have forgotten to use it, the unused variable warning
given by GCC has given me a hint, and I have quickly fixed the code in few
seconds.

Not every problem is worth using a sledgehammer to deal with.


The alternative is then to do as I think Go has done, and turn unused variables into errors. And then you need a way (like a pragma) to locally disable this error when you are debugging (and this is not nice), or when you
 generate code automatically (this is acceptable).

I've used pragmas to turn of warnings before. Sorry, but "bleh".

Reply via email to