Portability bug in integral conversion

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Jan 16 16:10:02 PST 2011


On 1/16/11 5:53 PM, bearophile wrote:
> Graham St Jack:
>
>> It seems to me that the real problem here is that it isn't meaningful to
>> perform (a-b) on unsigned integers when (a<b). Attempting to clean up
>> the resultant mess is really papering over the problem. How about a
>> runtime error instead, much like dividing by 0?
>
> I'm asking for signed and unsigned overflows for years :-)
>
> Bye,
> bearophile

Nagonna happen.

Andrei


More information about the Digitalmars-d mailing list