This is the mail archive of the libstdc++@gcc.gnu.org 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]
Other format: [Raw text]

Re: [RFA] libstdc++/22203, aka PowerPC vs numeric_limits<integer>::traps


Benjamin Kosnik <bkoz@redhat.com> writes:

| > If PPC claims integer arithmetic does not trap then we do need
| > *testcases* to go with the patch.  The snipped provided in the PR does
| > not test anything.  We do need actual program that tests that the
| > operations don't trap.  With that modification, the patch is OK.
| 
| Well, it would certainly be nice to test this, but please note there
| are no signal or traps testing for numeric_limits presently.

Indeed, but all plateforms in that area have been declared trapping on
integers.

| Maybe Mr. Pinski has a clever idea about how to test this, since he
| must have run into something to find it?

In this specific case, the claim is that division by zero does not
trap.  I would think that 

     int main()
     {
        volatile int zero = 0;
        return 1 / zero;
     }

would run without delivering any signal, therefore should be included
in the patch (or variation of that).

-- Gaby


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