Lints, Condate and bugs

Roman Ivanov isroman.del at ete.km.ru
Wed Oct 27 20:26:34 PDT 2010


On 10/27/2010 5:36 AM, Don wrote:
> Walter Bright wrote:
>> Ellery Newcomer wrote:
> 
>>>> I don't think there's much value left for add-on static analysis tools.
>>> I went to the trouble of modifying dmd to warn on unsigned/signed
>>> comparison. It found me some bugs which probably would not have been
>>> noticed otherwise. Did it produce false positives? Yes. Did that make
>>> me wish I hadn't done it? Hell no.
>>
>> You might want to consider changing your coding style to eschew the
>> use of unsigned types.
> 
> I would strongly support that. But it doesn't really work.
> The problem is size_t. The fact that it's unsigned is a root of all
> kinds of evil. It means .length is unsigned!!!

This probably has been discussed to death before, but what are the big
issues with checking for overflows and prohibiting (or giving warnings)
on implicit unsigned-to-signed conversion?


More information about the Digitalmars-d mailing list