delorie.com/archives/browse.cgi | search |
Date: | Wed, 27 Aug 2003 14:06:02 -0500 |
From: | Eric Rudd <rudd AT cyberoptics DOT com> |
Subject: | Re: Arithmetic Exceptions in C99 |
In-reply-to: | <9003-Wed27Aug2003201417+0300-eliz@elta.co.il> |
To: | djgpp-workers AT delorie DOT com |
Message-id: | <3F4D011A.1080203@cyberoptics.com> |
Organization: | CyberOptics |
MIME-version: | 1.0 |
X-Accept-Language: | en,pdf |
User-Agent: | Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3) Gecko/20030312 |
References: | <200308251635 DOT h7PGZkg2012070 AT speedy DOT ludd DOT luth DOT se> |
<3F4A4AED DOT 459EE8BE AT phekda DOT freeserve DOT co DOT uk> | |
<9003-Wed27Aug2003201417+0300-eliz AT elta DOT co DOT il> | |
X-MailScanner-Information: | Please contact the ISP for more information |
X-MailScanner: | Found to be clean |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
Eli Zaretskii wrote: >In particular, do we really intend to >change all our math functions to trigger SIGFPE when the standard >says ``should raise an exceptions''? > I'm having trouble reconciling Annex F with the following clause from the main body of C99: |7.12.1 Treatment of error conditions ||1 The behavior of each of the functions in <math.h> is specified for all representable ||values of its input arguments, except where stated otherwise. Each function shall execute ||as if it were a single operation without generating any externally visible exceptional ||conditions.| ||||||which suggests to me that SIGFPE should not be set by the math functions under any conditions. If I am missing something, please straighten me out, but I thought that "exception" in the context of C99 had to do with setting errno, rather than a low-level processor state, as it seems to imply in Annex F. Perhaps this would be a good question for comp.std.c. To cause the math functions to set SIGFPE, where they previously did not, could break existing code. Question: Has it already been decided that DJGPP will be IEC 60559 compliant (that is, comply with Annex F)? -Eric Rudd rudd AT cyberoptics DOT com ||
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |