Wish: Variable Not Used Warning

Bruce Adams tortoise_74 at yeah.who.co.uk
Wed Jul 9 17:08:12 PDT 2008


On Wed, 09 Jul 2008 09:34:30 +0100, Don <nospam at nospam.com.au> wrote:

> 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.
>
I was assuming you've already compiled the library with whatever options  
it needs
and you are only parsing the D to import interfaces etc. for your code.

>> 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.
>



More information about the Digitalmars-d mailing list