Unused variables, better as error or warning?
Nick Sabalausky
a at a.a
Fri Aug 20 12:45:01 PDT 2010
"KennyTM~" <kennytm at gmail.com> wrote in message
news:i4mk20$306o$1 at digitalmars.com...
> On Aug 21, 10 02:53, Jonathan M Davis wrote:
>> On Friday, August 20, 2010 11:35:48 Nick Sabalausky wrote:
> [snip]
>>>
>>> An error would be an enormous pain in the ass. A warning might be
>>> helpful
>>> in some cases.
>>
>> Except that thanks to how warnings are deal with in dmd, there's not much
>> difference between an error and a warning; it's just a question of how
>> picky you
>> want to be about errors. As it is, I'd argue that there is no such thing
>> as a
>> real warning in D. You never see warnings unless you use -w, at which
>> point
>> they're treated as errors. And if you're being at all careful, you're
>> going to
>> be compiling with -w, so it doesn't make much difference. You can choose
>> to
>> compile without -w until you think what you have works and then use -w to
>> find
>> stuff you missed, but then you could easily be being shot in the foot by
>> something that's considered a warning. If you had seen it, you could have
>> dealt
>> with it. What dmd needs is for warnings to be visible in normal
>> compilation,
>> making -w only make warnings errors as opposed to being the way to make
>> them
>> appear as well. As it is, warnings pretty much might as well be errors.
>>
>> - Jonathan M Davis
>
> You can treat warnings as warnings with '-wi' instead of '-w'.
Yea, I bitched and bitched and bitched about that until Walter finally caved
:)
More information about the Digitalmars-d
mailing list