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

Nick Sabalausky a at a.a
Wed Feb 10 14:50:42 PST 2010


Real-world example that's actually happened to me far too many times (and 
has *never* happened to me in any language other than D):

I'm writing app A and library B, both of which depend on an external library 
C. I compile A/B with -w to check for any warnings in my code. Either it has 
warnings and I fix them or it just simply passes.

Then, I make a change to A/B that brings in previously unused code from C 
(or I just simply update C), and this new code in C just happens to have 
something that triggers a warning (you can say "C should never release 
without fixing all warnings first" all you want, but the fact is: it still 
happens). I compile A/B again, and again I use -w to check for any warnings 
in the changes I made to A/B. Compiler spits out a warning on C and then (by 
design!) just plain craps out without 1. telling me a damn thing about my 
own code, or 2. actually building either A or B.

So now *I can't even compile* my A/B without either:

1. Waiting (and *hoping*) for a fix to C, both for my own sake and for the 
sake of all users of B and all people who want or need to compile A 
themselves.

2. Screwing up my schedule by detouring into making a fix for C, submitting 
it, and then for the sake of all users of B and the sake of all people who 
want or need to compile A themselves, wait for the fix to get accepted and 
incorporated into a new release of C.

3. (Something I'd still have to do anyway even if I go with option 1 or 
option 2): Entirely turning off the check for warnings.

Thus, -w's behavior has *prevented* me from seeing my warnings.

Royal PITA every single time. (And a <20 line trivial fix has been sitting 
in bugzilla for nearly a year, #2567, hell, I'll update and resubmit if 
that'll help get it in.)





More information about the Digitalmars-d mailing list