Wish: Variable Not Used Warning

BCS ao at pathlink.com
Thu Jul 10 14:09:26 PDT 2008


Reply to Markus,

> On Thu, 10 Jul 2008 12:51:47 -0700, Walter Bright wrote:
> 
>> Robert Fraser wrote:
>> 
>>> In a final release, unused things are signs of errors. When writing
>>> code, unused variables (perhaps they were used in a commented-out
>>> section?) are a dime a dozen.
>>> 
>> Yes, that's why I find the warning to be a nuisance, not a help.
>> 
> I'd been coding for awhile, and I have hard times to remember the last
> time I have had unused vars or other pieces of code, that would be
> there intentionally... Sure, I may have got some sort of brain-damage
> due to heavy use of "gcc -Wall" and "lint" to affect to my coding
> style so that I unconsciously avoid warning-generating sketchs...
> 
> About those unused imports (mentioned by Robert) - I think that the
> compiler could stop also with those. I was just coming to that subject
> :D
> 

one cases where the extra vars might be added is as padding for cache effects.





More information about the Digitalmars-d mailing list