This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: Use template adapter to account for signal() prototype variations
- To: libstdc++ at gcc dot gnu dot org
- Subject: Re: Use template adapter to account for signal() prototype variations
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 22 Dec 2000 04:11:11 -0200
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <or4rzxxail.fsf@guarana.lsd.ic.unicamp.br>
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