Use template adapter to account for signal() prototype variations

Alexandre Oliva aoliva@redhat.com
Mon Dec 25 13:03:00 GMT 2000


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

> 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.

Here's a revised patch that addresses both issues.  Ok to install?



More information about the Libstdc++ mailing list