This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Use template adapter to account for signal() prototype variations


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]