Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bbn!rochester!cornell!vax1!en2j From: en2j@vax1.UUCP (Thomas Purcell) Newsgroups: comp.lang.c Subject: explicit runtime condition code checking, particularly overflow Message-ID: <574@vax1.UUCP> Date: Wed, 2-Dec-87 11:03:31 EST Article-I.D.: vax1.574 Posted: Wed Dec 2 11:03:31 1987 Date-Received: Sat, 5-Dec-87 14:46:52 EST Expires: Thu, 31-Dec-87 00:00:00 EST Reply-To: en2j@vax1.ccs.cornell.edu Organization: Cornell Computer Services, Ithaca NY Lines: 22 Keywords: runtime condition condition_code checking overflow Summary: would like to know how to essentially do a "branch on overflow" I'd love to know if there's ANY way of doing runtime condition code checking in C. In particular, I'd like to know if there's any way to write a line of C code which essentially translates into a Branch On Overflow, or Bcc LABEL, where B means branch, cc is a condition code, and label is the name of a procedure. Kernighan and Ritchie I think say something like 'there should be a library routine to deal with it, depending on your machine'. My other two C manuals, (Thom Hogan, and the other by Steve Kochan) don't seem to mention the problem at all. [perhaps I missed a mention of it] All I want to do is see if an expression which I'm evaluating overflows, and handle it myself if it does! And the only answer I've gotten so far is on the order of "random machine action on overflow depending on implementation." Can anybody help? Please send a copy of your response directly. -thomas en2j@crnlvax1.bitnet The symbol after the "vax" is a ONE, not en2j@vax1.ccs.cornell.edu an L .