www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Fixing More Warnings in DMD?

reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
I've recent fixed a few warnings in D here:

https://github.com/D-Programming-Language/dmd/pull/3543

At the end of the thread I asked:

Should I continue fixing GLUE, BACK and ROOT or focus on 
remaining warnings in DMD?

but Walter has not responded so I'm asking it here once again.

Comments anyone?
May 26 2014
next sibling parent reply "andro" <my email.foo> writes:
On Monday, 26 May 2014 at 20:58:22 UTC, Nordlöw wrote:
 I've recent fixed a few warnings in D here:

 https://github.com/D-Programming-Language/dmd/pull/3543

 At the end of the thread I asked:

 Should I continue fixing GLUE, BACK and ROOT or focus on 
 remaining warnings in DMD?

 but Walter has not responded so I'm asking it here once again.

 Comments anyone?
Well, I gathered some of warnings I have come across while doing some code browsning. https://github.com/D-Programming-Language/dmd/pull/3598
May 27 2014
parent =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
Great!

Thx
May 28 2014
prev sibling parent reply "Dicebot" <public dicebot.lv> writes:
On Monday, 26 May 2014 at 20:58:22 UTC, Nordlöw wrote:
 I've recent fixed a few warnings in D here:

 https://github.com/D-Programming-Language/dmd/pull/3543

 At the end of the thread I asked:

 Should I continue fixing GLUE, BACK and ROOT or focus on 
 remaining warnings in DMD?

 but Walter has not responded so I'm asking it here once again.

 Comments anyone?
I don't think it is worth spending too much time on it because of ongoing DDMD transition which will make many of those issues obsolete.
May 28 2014
parent reply "bearophile" <bearophileHUGS lycos.com> writes:
Dicebot:

 I don't think it is worth spending too much time on it because 
 of ongoing DDMD transition which will make many of those issues 
 obsolete.
Some of those warnings are not generated by D compiler (like unused variables and labels, unused arguments, signed/unsigned comparisons, etc), so better to catch and fix them before porting the code to D. Bye, bearophile
May 28 2014
next sibling parent =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
 Some of those warnings are not generated by D compiler (like 
 unused variables and labels, unused arguments, signed/unsigned 
 comparisons, etc), so better to catch and fix them before 
 porting the code to D.
I completely agree. /Per
May 28 2014
prev sibling parent reply "bearophile" <bearophileHUGS lycos.com> writes:
 Some of those warnings are not generated by D compiler (like 
 unused variables and labels, unused arguments, signed/unsigned 
 comparisons, etc), so better to catch and fix them before 
 porting the code to D.
In D I'd like optional warnings for unused variables/labels/arguments/last assignments, and for signed-unsigned comparisons. Such basic things are not a job for Dscanner. Bye, bearophile
May 29 2014
parent reply "Dicebot" <public dicebot.lv> writes:
On Thursday, 29 May 2014 at 09:35:26 UTC, bearophile wrote:
 Some of those warnings are not generated by D compiler (like 
 unused variables and labels, unused arguments, signed/unsigned 
 comparisons, etc), so better to catch and fix them before 
 porting the code to D.
In D I'd like optional warnings for unused variables/labels/arguments/last assignments, and for signed-unsigned comparisons. Such basic things are not a job for Dscanner. Bye, bearophile
unused variables are job for dscanner signed-unsigned comparison should be an error, not warning
May 29 2014
parent reply "bearophile" <bearophileHUGS lycos.com> writes:
Dicebot:

 unused variables are job for dscanner
Unused variables/labels/arguments and unused last assignments are often flags for code problems (but the ones in the function/class you are writing now). I like how such tests are done by the GCC/Clang compilers.
 signed-unsigned comparison should be an error, not warning
I don't know if Rust does this. But isn't it a little late for D? And aren't such errors going to introduce even more dangerous casts? Bye, bearophile
May 29 2014
parent "Dicebot" <public dicebot.lv> writes:
On Thursday, 29 May 2014 at 20:49:04 UTC, bearophile wrote:
 Dicebot:

 unused variables are job for dscanner
Unused variables/labels/arguments and unused last assignments are often flags for code problems (but the ones in the function/class you are writing now). I like how such tests are done by the GCC/Clang compilers.
And even more often those are side effect of active debugging and indicate no issues.
 signed-unsigned comparison should be an error, not warning
I don't know if Rust does this. But isn't it a little late for D? And aren't such errors going to introduce even more dangerous casts?
If it is late for an error, it is late for a warning too. Thus -> DScanner. You are very unlikely to convince me there is even a single legitimate use case for warnings other than deprecation cycle ;)
May 29 2014