Should we warn if we detect null derefernces or void value uses ?

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 8 07:17:38 PST 2016


On Thursday, 8 December 2016 at 08:52:45 UTC, qznc wrote:
> On Monday, 5 December 2016 at 04:41:55 UTC, Stefan Koch wrote:
>>  This requires data-flow analysis (The same kind that tells 
>> you if you are skipping a statement)
>> And will slow down compilation a little if we enable such a 
>> warning.
>
>
> I would rather see a separate tool for stuff like this. It can 
> be much slower and do much more analysis.
>
> Compare: clang-analyzer http://clang-analyzer.llvm.org/

Due to D's stronger focus on correctness,
something like the clang static analyzer has importance in D then 
it has in C++.

Also If we don't stick to unambiguous errors, there will be a LOT 
of false positives.



More information about the Digitalmars-d mailing list