Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!chem.ucsd.edu!tps From: tps@chem.ucsd.edu (Tom Stockfisch) Newsgroups: comp.lang.c Subject: Re: checking for overflow in C Message-ID: <472@chem.ucsd.EDU> Date: 17 May 89 05:18:58 GMT References: <13367@dartvax.Dartmouth.EDU> <1989May6.224226.22085@utzoo.uucp> <1989May9.183140.1770@utzoo.uucp> <8172@june.cs.washington.edu> <1079@atanasoff.cs.iastate.edu> <1989May12.154417.21344@utzoo.uucp> <10256@smoke.BRL.MIL> Reply-To: tps@chem.ucsd.edu (Tom Stockfisch) Organization: Chemistry Dept, UC San Diego Lines: 17 In article <10256@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: _A few years ago, a system manager here, responding to naive "customer" _pressure to generate floating exceptions on our Gould PN series machines, _modified the run-time start-off module to enable exceptions. What he _didn't appreciate was that the C compiler generated code that required _integer overflow to be ignored, and the Gould hardware tied integer _and floating exceptions to the same enable bit. Consequently non-floating _applications started dying due to unexpected SIGFPEs. We were not amused. Aren't unsigned int operations guaranteed not to generate exceptions? It seems like the C compiler could/should have done things differently. So, what machines/systems does SIGFPE not work reliably on? -- || Tom Stockfisch, UCSD Chemistry tps@chem.ucsd.edu