X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f Date: 18 Nov 2003 07:59:59 +0200 Message-Id: From: Eli Zaretskii To: Kbwms AT aol DOT com CC: djgpp-workers AT delorie DOT com In-reply-to: (Kbwms@aol.com) Subject: Re: math_errhandling [PATCH] References: 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 Precedence: bulk > From: Kbwms AT aol DOT com > Date: Mon, 17 Nov 2003 17:05:27 EST > > > > In the context of math_errhandling, "exception" means feraiseexcept, > > fegetexcept, etc. That's why I put exception in quotes. > > > > I think you're talking about FP exceptions raised by the processor. Am I > > correct? > > > > That's true, but they are exactly the same exceptions nevertheless. > Moreover, we have always had the ability to *set* floating point exceptions via > _control87(), *test* them via _status87() and *clear* them via _clear87() or > _fpreset() (which resets the FPU completely). The reason we have the functions in > fenv.h is to satisfy the requirements of C99. I'm not sure: this seems to be an area where we still didn't finalize the future library design. Personally, I don't like very much the idea of fiddling with the x87 status and control bits for implementing the fe* functions. I think we should _read_ those bits and put them into the values those function return, but we should not _write_ the bits. In other words, feraiseexcept should add bits to some word it maintains internally, but not in the x87 status word.