How DMD's -w *Prevents* Me From Seeing My Warnings

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Feb 12 15:11:59 PST 2010


Walter Bright wrote:
> Nick Sabalausky wrote:
>> Ok, that is a big improvement (thanks!!!), but this still remains:
>>
>> 1. I compile my program, with warnings as I always do (because I want 
>> to be told about them, and as early as possible).
>> 2. I fix all my errors, but I get a warning in an external library.
>> 3. Now I have to go modify my build script and recompile just to get 
>> the output files that DMD arbitrarily refused to give me before (and 
>> then go edit my built script again to turn them back on). Which is not 
>> impossible, but it's all for...what benefit exactly? I mean, even if 
>> there were a legitimate reason for forcing any warnings to suppress 
>> output files (and I very much dispute that there is), the fact I can 
>> get the same damn output files anyway by shutting the warnings off and 
>> recompiling renders the whole "feature" pointless. You may as well 
>> just write the output files anyway and save people the bother of 
>> working around it.
> 
> Here's how I set up a makefile to build with different options:
> 
> ----------------------------
> FLAGS=
> 
> foo : foo.d
>     dmd foo $(FLAGS)
> 
> warnings :
>     make FLAGS=-w
> ----------------------------
> 
> Use
>     make
> 
> to do a regular build, and
> 
>     make warnings
> 
> to do a warnings build.

Do you even need to define FLAGS at the top of the file?

Andrei



More information about the Digitalmars-d mailing list