| Thread overview | |||||
|---|---|---|---|---|---|
|
February 27, 2016 Warnings for DDMD source | ||||
|---|---|---|---|---|
| ||||
I'd like to enable warnings for building DDMD (-w, or -wi if there is too much debate). The outputted warnings will depend on the D compiler used, but at least using "-wi" may improve code quality I think. Right now, there are a bunch of switch case warnings, e.g.: argtypes.d(296): Warning: switch case fallthrough - use 'goto case;' if intended argtypes.d(304): Warning: switch case fallthrough - use 'goto case;' if intended canthrow.d(149): Warning: switch case fallthrough - use 'goto default;' if intended dcast.d(363): Warning: switch case fallthrough - use 'goto case;' if intended dcast.d(377): Warning: switch case fallthrough - use 'goto case;' if intended dcast.d(463): Warning: switch case fallthrough - use 'goto default;' if intended dcast.d(604): Warning: switch case fallthrough - use 'goto case;' if intended And there is a funny: target.d(269): Warning: statement is not reachable on the line: 269: return null; // avoid warning These warnings are easily fixed and (for me) improve legibility. Let me know what you think. I'm happy to submit a PR. In fact, why don't I do it right now, while you debate about it. | ||||
February 27, 2016 Re: Warnings for DDMD source | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Johan Engelen | On Saturday, 27 February 2016 at 12:18:19 UTC, Johan Engelen wrote:
> I'd like to enable warnings for building DDMD
Forgot to note that one of the reasons for this is that warnings can be very useful for us working downstream on LDC. They can quickly point to merge error locations / code locations where we should work on.
| |||
February 27, 2016 Re: Warnings for DDMD source | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Johan Engelen | On Saturday, 27 February 2016 at 12:18:19 UTC, Johan Engelen wrote: > Let me know what you think. I'm happy to submit a PR. In fact, why don't I do it right now, while you debate about it. https://github.com/D-Programming-Language/dmd/pull/5482 | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply