lkml.org 
[lkml]   [1998]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: have a look at this proggie, please.
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/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.104 / U:0.312 seconds]
©2003-2011 Jasper Spaans. Advertise on this site