digitalmars.D - Fixing More Warnings in DMD?
- =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= (7/7) May 26 2014 I've recent fixed a few warnings in D here:
- andro (4/11) May 27 2014 Well, I gathered some of warnings I have come across while doing
- =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= (2/2) May 28 2014 Great!
- Dicebot (4/11) May 28 2014 I don't think it is worth spending too much time on it because of
- bearophile (7/10) May 28 2014 Some of those warnings are not generated by D compiler (like
- =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= (2/6) May 28 2014 I completely agree.
- bearophile (6/10) May 29 2014 In D I'd like optional warnings for unused
- Dicebot (3/13) May 29 2014 unused variables are job for dscanner
- bearophile (10/12) May 29 2014 Unused variables/labels/arguments and unused last assignments are
- Dicebot (7/17) May 29 2014 And even more often those are side effect of active debugging and
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
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
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
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
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
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
On Thursday, 29 May 2014 at 09:35:26 UTC, bearophile wrote:unused variables are job for dscanner signed-unsigned comparison should be an error, not warningSome 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
Dicebot:unused variables are job for dscannerUnused 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 warningI 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
On Thursday, 29 May 2014 at 20:49:04 UTC, bearophile wrote:Dicebot:And even more often those are side effect of active debugging and indicate no issues.unused variables are job for dscannerUnused 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.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 ;)signed-unsigned comparison should be an error, not warningI 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?
May 29 2014