Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!uw-june!ka From: ka@june.cs.washington.edu (Kenneth Almquist) Newsgroups: comp.lang.c Subject: Re: checking for overflow in C Message-ID: <8143@june.cs.washington.edu> Date: 8 May 89 09:13:52 GMT References: <13367@dartvax.Dartmouth.EDU> <1989May6.224226.22085@utzoo.uucp> Organization: U of Washington, Computer Science, Seattle Lines: 10 henry@utzoo.uucp (Henry Spencer) writes: > C unfortunately has to be close to the hardware of a wide variety of > machines. There is no consensus on whether the hardware checks for overflow > or not. C generally prefers to reflect the underlying hardware rather > than trying to hide it, so this lack of consensus shows to the programmer. If there is not a consensus, there is certainly an overwhelming majority! I know the assembly languages of half a dozen machines, and they all include overflow checks. Kenneth Almquist