-
-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print warnings by default #18965
Labels
Comments
bearophile_hugs commented on 2015-03-28T21:58:52ZSee also Issue 13040 , Issue 10147 |
k.hara.pg commented on 2015-03-29T04:27:28Z*** Issue 14366 has been marked as a duplicate of this issue. *** |
mk commented on 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. |
bearophile_hugs commented on 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. |
clugdbug commented on 2015-12-08T08:37:17ZI 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. |
dfj1esp02 commented on 2015-12-08T09:02:13ZWarnings can work as out of line code style checkers. Breaking compilation on enabled warnings doesn't work well for this. |
bearophile_hugs commented on 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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shammah Chancellor reported this on 2015-03-28T18:22:54Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=14367
CC List
Description
The text was updated successfully, but these errors were encountered: