Ian Lance Taylor writes:
> Robert Dewar <[EMAIL PROTECTED]> writes:
>
> > Ian Lance Taylor wrote:
> >
> > > We do want to generate a trap for x / 0, of course.
> >
> > Really? Is this really defined to generate a trap in C?
> > I would be surprised if so ...
>
> As far as I know, but I think it would be a surprising change for x /
> 0 to silently continue executing.
>
> But perhaps not a very important one.
Java depends for correct execution on some divisions by zero (in
libgcc) generating traps.
For example, here's one in __udivmoddi4:
if (d0 == 0)
d0 = 1 / d0; /* Divide intentionally by zero. */
Andrew.