Use template adapter to account for signal() prototype variations

Alexandre Oliva aoliva@redhat.com
Thu Dec 21 22:11:00 GMT 2000


On Dec 22, 2000, Alexandre Oliva <aoliva@redhat.com> wrote:

> Trace/BPT trap (core dumped)

> when testing whether bool divide-by-zero traps.  Can anybody explain
> this, and suggest how to work around it?

Well, adding signal handlers for SIGTRAP fixes the problem.

However, the results appear wrong to me.  If division by zero traps,
should traps be true, even if overflow doesn't trap?  traps() computes
a `&&' of the two conditions, whereas I'd expect a `||' here, but I
can't tell which is correct, based on the Standard.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


More information about the Libstdc++ mailing list