[Issue 9811] New: Add static code analyzing (i.e. PVS-Studio-like diagnostic)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 24 23:52:46 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9811

           Summary: Add static code analyzing (i.e. PVS-Studio-like
                    diagnostic)
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-03-25 09:52:44 MSK ---
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 change
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list