checking for overflow in C

Tom Stockfisch tps at chem.ucsd.edu
Wed May 17 15:18:58 AEST 1989


In article <10256 at smoke.BRL.MIL> gwyn at 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 at chem.ucsd.edu



More information about the Comp.lang.c mailing list