Wish: Variable Not Used Warning

Don nospam at nospam.com.au
Wed Jul 9 01:34:30 PDT 2008


Bruce Adams wrote:
> On Mon, 07 Jul 2008 09:23:15 +0100, Don <nospam at nospam.com.au> wrote:
> 
>>
>> I agree. Unfortunately, there's a problem with the 'optional' warnings 
>> we have in DMD right now. They are not optional for libraries. If a 
>> library generates warnings, then it is not usable by anyone who wants 
>> to compile with warnings enabled.
>>
>> I'd love to see the warnings tightened up so that they can become bugs.
>>
> 
> That is questionably a flaw in the way D processes libraries. But the 
> same flaw as in C++.

It's even worse in D, though, because with warnings switched on the 
library won't compile at all.

> If your include file has warnings you have to surpress them when using 
> the library.

And D has no way to do that.

> Presumably if you use .di files (created/compiled with warnings switched 
> off) this won't
> happen?

That's an interesting idea. That might well work.

> 
> Regards,
> 
> Bruce.



More information about the Digitalmars-d mailing list