compiler detecting divide by zero

Dave Jones djones at megatest.UUCP
Tue Dec 4 11:36:37 AEST 1990


>From article <36233 at cup.portal.com>, by ts at cup.portal.com (Tim W Smith):
> For obscure reasons that I won't go into, I wanted a divide
> by zero in a program.

[But the compiler made it tough.]

I too got into a mess like this the other day. I was writing some
very low-level stuff and just wanted to use the assembly language output
from the C compiler as a guide. The compiler "optimized" away some of
my code. It didn't optimize away all of it, although it was all theoretically
"dead".  Luckily, checking it over, I figured out that something
was amiss.



More information about the Comp.lang.c mailing list