Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!boulder!sunybcs!rutgers!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.lang.c Subject: Re: Expressions compared to zero in *c* Message-ID: <1154@bsu-cs.UUCP> Date: Tue, 15-Sep-87 10:19:25 EDT Article-I.D.: bsu-cs.1154 Posted: Tue Sep 15 10:19:25 1987 Date-Received: Thu, 17-Sep-87 05:44:43 EDT References: <374@mcdsun.UUCP> <766@maccs.UUCP> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 8 Summary: trap on overflow In article <766@maccs.UUCP> gordan@maccs.UUCP (Gordan Palameta) writes: >However, if the comparison is done as a - b > 0, everything magically >works thanks to the properties of two's complement arithmetic under >overflows. ...Except if the hardware causes a trap when a signed quantity overflows. -- Rahul Dhesi UUCP: !{iuvax,pur-ee,uunet}!bsu-cs!dhesi