Add static code analyzing to dmd
Denis Shelomovskij
verylonglogin.reg at gmail.com
Sat Jun 29 08:20:55 PDT 2013
IMHO it's an important enhancement as I see no reasons for the compiler
to not inform about may-be-an-error situations if the user asks as it
will save a lot people time.
Original issue:
http://d.puremagic.com/issues/show_bug.cgi?id=9811
Description:
There are things which may or may not indicate and error. Current
compiler behavior is: "I'm a compiler, I can't even give a warning if
there is a chance for false positive, there are only warnings and
errors". But it looks inconsistent with the fact a compiler tries to
help the developer by doing code coverage, documentation etc. Static
code analyzing is an essential task a compiler could also do and do
good. Also, IMHO, compilers should do static analyzing instead of
external tools.
So I propose to add "-diagnostic" flag to the compiler for things Walter
is "a bit uncomfortable in declaring it as always wrong" and also for
things that are definitely not always wrong. There also could be
different levels of such analyzing and ability to treat diagnostic
warnings as errors.
See also:
[1] Interview of Walter Bright by Andrey Karpov
http://www.viva64.com/en/b/0182/
[2] NG thread about the interview
http://forum.dlang.org/thread/nnzzbsafuwwzuotvlkpu@forum.dlang.org
--
Денис В. Шеломовский
Denis V. Shelomovskij
More information about the Digitalmars-d
mailing list