From dev-return-7720-apmail-stdcxx-dev-archive=stdcxx.apache.org@stdcxx.apache.org Mon Jun 02 15:58:45 2008 Return-Path: Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: (qmail 65117 invoked from network); 2 Jun 2008 15:58:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jun 2008 15:58:45 -0000 Received: (qmail 36496 invoked by uid 500); 2 Jun 2008 15:58:47 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 36432 invoked by uid 500); 2 Jun 2008 15:58:47 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 36421 invoked by uid 99); 2 Jun 2008 15:58:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jun 2008 08:58:47 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.30.140.160] (HELO moroha.roguewave.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jun 2008 15:57:53 +0000 Received: from exchmail01.Blue.Roguewave.Com (exchmail01.blue.roguewave.com [10.22.129.22]) by moroha.roguewave.com (8.13.6/8.13.6) with ESMTP id m52FwDOO012182 for ; Mon, 2 Jun 2008 15:58:13 GMT X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: svn commit: r661873 - /stdcxx/branches/4.2.x/tests/regress/18.limits.traps.stdcxx-624.cpp Date: Mon, 2 Jun 2008 09:58:17 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: svn commit: r661873 - /stdcxx/branches/4.2.x/tests/regress/18.limits.traps.stdcxx-624.cpp Thread-Index: AcjDbFvyP0D/jFhDTOunbTwmyk42QABXNjEg References: <20080530212406.8DA2D2388A22@eris.apache.org> <4841CE84.5070904@roguewave.com> From: "Travis Vitek" To: X-Virus-Checked: Checked by ClamAV on apache.org =20 >-----Original Message----- >From: Martin Sebor [mailto:msebor@gmail.com] On Behalf Of Martin Sebor >Sent: Saturday, May 31, 2008 3:18 PM >To: dev@stdcxx.apache.org >Subject: Re: svn commit: r661873 -=20 >/stdcxx/branches/4.2.x/tests/regress/18.limits.traps.stdcxx-624.cpp > >vitek@apache.org wrote: >> Author: vitek >> Date: Fri May 30 14:24:06 2008 >> New Revision: 661873 >>=20 >> URL: http://svn.apache.org/viewvc?rev=3D661873&view=3Drev >> Log: >> 2008-05-30 Travis Vitek >>=20 >> STDCXX-833 >> * tests/regress/18.limits.traps.stdcxx-624.cpp: Add special >> handling for divide by zero on windows. >>=20 >[...] >> @@ -66,14 +76,21 @@ >> if (std::numeric_limits::traps) >> std::signal (SIGFPE, handle_FPE); >> =20 >> + bool trapped =3D false; >> + >> // if this traps (generates SIGFPE), verify (in the=20 >signal handler) >> // that integer arithmetic is expected to trap >> - result =3D non_zero / zero; >> - result +=3D non_zero % zero; >> + TRY { >> + result =3D non_zero / zero; >> + result +=3D non_zero % zero; >> + } >> + EXCEPT (1) { >> + trapped =3D true; >> + } >> =20 >> // if we get this far, verify that integer arithmetic=20 >is known not >> // to trap > >Since after this change it's no longer true that the assertions below >verify that integer arithmetic does not trap the comment above needs >to be updated. (The comment about SIGFPE above could also stand to >be updated to explain that the handler is never entered on Windows. > Committed in r662468 [http://svn.apache.org/viewvc?view=3Drev&revision=3D662468] Travis >Martin > >> - assert (!std::numeric_limits::traps); >> + assert (trapped =3D=3D std::numeric_limits::traps); >> =20 >> (void)&result; >> =20 >>=20 >>=20 > >