digitalmars.D - another warnings question
- Carlos Santander B. (17/17) Mar 08 2005 I'm not comfortable with this behavior:
- Ben Hinkle (8/25) Mar 08 2005 I tried running -w with MinTL, too, and got through about 1/2 of a file ...
I'm not comfortable with this behavior: //---------------------- import foo; void main() {} //---------------------- Compiled with warnings enabled, DMD checks warnings for "foo" too. While it could be a good thing when "foo" is my own code, I don't like it when it's part of another project (I think C and C++ do the same thing, but it's not actually relevant). This is particularly bad right now that DMD is treating warnings as errors and stopping really fast when finding warnings. So, there I was wanting to check a small program of mine for possible warnings, and DMD didn't say a word about it but just complained about MinTL (which my program uses). In conclussion, with the current status quo, I can't check my program. My proposal: don't enable warnings for imported modules. Any thoughts? _______________________ Carlos Santander Bernal
Mar 08 2005
In article <d0lm6u$tmk$1 digitaldaemon.com>, Carlos Santander B. says...I'm not comfortable with this behavior: //---------------------- import foo; void main() {} //---------------------- Compiled with warnings enabled, DMD checks warnings for "foo" too. While it could be a good thing when "foo" is my own code, I don't like it when it's part of another project (I think C and C++ do the same thing, but it's not actually relevant). This is particularly bad right now that DMD is treating warnings as errors and stopping really fast when finding warnings. So, there I was wanting to check a small program of mine for possible warnings, and DMD didn't say a word about it but just complained about MinTL (which my program uses).I tried running -w with MinTL, too, and got through about 1/2 of a file before it kept halting the compile on if-return early exits saying everything else is unreachable. I gave up after commenting out two of those just as a last gasp at trying -w. Hopefully once that gets fixed -w will be meaningful on MinTL.In conclussion, with the current status quo, I can't check my program. My proposal: don't enable warnings for imported modules. Any thoughts?That probably makes sense for non-templates but I have a feeling that checking templates will be worth it since there could be code paths that only get tickled after being instantiated. I don't know for sure, though._______________________ Carlos Santander Bernal
Mar 08 2005