Portability bug in integral conversion

bearophile bearophileHUGS at lycos.com
Sun Jan 16 15:53:01 PST 2011


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


More information about the Digitalmars-d mailing list