Comment #0 by shammah.chancellor — 2015-03-28T18:22:54Z
DMD currently does not print warning by default. This should be changed so that people are notified of deprecated features during compilation and can start fixing them. It will come as a surprise when these features are finally removed. There should instead be a silent flag on the compiler to suppress warnings.
Comment #1 by bearophile_hugs — 2015-03-28T21:58:52Z
See also Issue 13040 , Issue 10147
Comment #2 by k.hara.pg — 2015-03-29T04:27:28Z
*** Issue 14366 has been marked as a duplicate of this issue. ***
Comment #3 by mk — 2015-04-11T11:24:21Z
(In reply to Shammah Chancellor from comment #0)
> DMD currently does not print warning by default. This should be changed so
> that people are notified of deprecated features during compilation and can
> start fixing them. It will come as a surprise when these features are
The whole point of deprecation messages (-dw) is to notify people of pending deprecation. Warnings (-wi) are something completely different. They warn about something which may or may not be wrong (buggy).
Sometimes warnings are used as a first stage before deprecation, but IMHO these two should not be mixed.
Since -dw is turned on by default, there is no need for -wi by default too.
Comment #4 by bearophile_hugs — 2015-04-11T18:05:55Z
(In reply to Martin Krejcirik from comment #3)
> Since -dw is turned on by default, there is no need for -wi by default too.
I'd like warnings by default, regardless what the compiler does regarding deprecated features.
Comment #5 by clugdbug — 2015-12-08T08:37:17Z
I think this bug should be closed as invalid. As stated in comment 3, warnings and deprecations are two very different things. The bug report is based on the misconception that they are the same.
deprecation = this code used to be correct, but now it is an error. The code must be fixed, but it is not urgent.
warning = the code might be perfectly correct.
Bearophile's comment 4 is something different. It is a real issue. I think it would best be fixed by removing warnings from the compiler entirely (which is in practice what Bearophile is asking for, if they are enabled by default they are just errors). The whole idea of an "optional error" is absurd. If a single library does not compile without warnings, then the app cannot be compiled with warnings enabled either. So warnings are usable only if all libraries respect them, which means they are not optional for libraries! But that is a discussion for a different place.
Comment #6 by dfj1esp02 — 2015-12-08T09:02:13Z
Warnings can work as out of line code style checkers. Breaking compilation on enabled warnings doesn't work well for this.
Comment #7 by bearophile_hugs — 2015-12-09T12:45:20Z
(In reply to Don from comment #5)
> Bearophile's comment 4 is something different. It is a real issue. I think
> it would best be fixed by removing warnings from the compiler entirely
> (which is in practice what Bearophile is asking for, if they are enabled by
> default they are just errors).
Nope. Warnings active on default should not stop compilation. So they are still different from errors. (Note that other good languages acts like I have suggested D to act). What I am asking is an obvious improvement for the D compiler.
Comment #8 by robert.schadek — 2024-12-13T18:41:40Z