Re: have a look at this proggie, please.

Oliver Xymoron (oxymoron@waste.org)
Wed, 18 Nov 1998 17:44:37 -0600 (CST)


On Wed, 18 Nov 1998, Tigran Aivazian wrote:

> int main(int argc, char *argv[])
> {
> int a = -MAXINT-1, b = -1, c = a*b;
....
> c = a / b;
....
> }

My PPro manual says:

#DE The signed result (quotient) is too large for the destination.

Since your result will be MAXINT+1, Divide Error and the mapping to SIGFPE
(arithmetic exception) seems appropriate. What would you prefer it do,
wrap the result around to zero? What does SPARC do?

--
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/