Clang static analysis results for dmd
Walter Bright
newshound2 at digitalmars.com
Sun Jul 24 19:10:28 PDT 2011
On 7/24/2011 2:06 PM, Robert Clipsham wrote:
> I took the liberty of running dmd through clang's static analysis, and it's
> turned up quite a few (486) potential bugs in dmd:
>
> http://octarineparrot.com/assets/dmd/
>
> There's bound to be a few false positives in there (please feel free to report
> them to the nice folk over at llvm), and the dead code won't cause any problems
> (and most of the "dead code" in the backend is probably in use with dmc or
> something), but there are still a few hundred potential crashes in there.
Looks like clang has some bugs itself.
http://octarineparrot.com/assets/dmd/report-ZGvM0T.html#EndPath
if ((unsigned short)value != value)
6 Both operands to '!=' always have the same value
No, that's not true. value is a uint64_t, and casting it to unsigned short and
then back to uint64_t does not yield the same value.
More information about the Digitalmars-d
mailing list